Hi, I am wondering whether it's possible to pass (and get back) arrays of complex floats via ctypes. To be concrete, I have managed to access lapack's dgges (Fortran) function using ctypes (thanks to a related example on this list), and now I would like to do the same with the complex version zgges. Thanks for your insights, Sven
Hello On Sun, 27 May 2007, Sven Schreiber wrote:
Hi, I am wondering whether it's possible to pass (and get back) arrays of complex floats via ctypes.
To be concrete, I have managed to access lapack's dgges (Fortran) function using ctypes (thanks to a related example on this list), and now I would like to do the same with the complex version zgges.
An array just gets passed to the function as a pointer, so the answer is definately yes. Do you need some specific code? Cheers, Albert
Albert Strasheim schrieb:
Hello
On Sun, 27 May 2007, Sven Schreiber wrote:
Hi, I am wondering whether it's possible to pass (and get back) arrays of complex floats via ctypes.
To be concrete, I have managed to access lapack's dgges (Fortran) function using ctypes (thanks to a related example on this list), and now I would like to do the same with the complex version zgges.
An array just gets passed to the function as a pointer, so the answer is definately yes. Do you need some specific code?
Thanks for offering, but indeed it already seems to work! I asked first (before trying), because getting a ready-to-use lapack dll for Windows that actually includes zgges is not trivial. (It turned out that the one from scilab has it.) And being totally ignorant in Fortran I didn't know what the equivalent of Fortran's COMPLEX*16 is in numpy (complex128 seems to work here). The ctypes integration in numpy is really great! Thanks, Sven
participants (2)
-
Albert Strasheim
-
Sven Schreiber