Dear all, I am having a hard time figuring out how to use my existing modules that are written in scipy and use complex numbers. If they receive input that has a been generated within sage, I cannot simply use scipy.real and scipy.imag to split the complex numbers.
I found that copying all my function definitions into sage partly resolves the problem -- I then need to 1) define ComplexNumber=scipy.complex128 and RealNumber=scipy.float64 2) whenever I use my variables together with typed numbers, such as "1.", I need to cast the result to scipy.complex128 using the scipy.array function before splitting in real and imaginary part. 3) I also cannot use the 1j syntax of scipy, so I write sqrt(-1). However,I didn't figure out yet how to use a whole function in a module which is imported into sage, and compute an array that will be split in a real and imaginary part inside a routine of the module... I looked at the reference manual but couldn't find a clue. Is this a common problem ? Best wishes, and thanks ! Giovanni --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
