Vladimir Rutsky added the comment: Yes, I managed to pass and operate with matrices of complex numbers to pure C and Fortran programs by using Numpy and their ctype adapters (only for whole matrices, they don't provide c_complex type; in general see http://www.scipy.org/Cookbook/Ctypes for details).
I suppose pure python solution that suggested in provided by you link works too: class Complex64(Structure): _fields_ = [("real", c_float), ("imag", c_float)] But I'm unsure is this is expected behavior or luck, and on some platform this code will not work due to different complex numbers internal representation. Any way this should be implemented in libffi first, and then in ctypes, so this feature request should be postponed, IMO. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16899> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com