[SciPy-User] Saving Complex Numbers

cfrazer@uc... cfrazer@uc...
Thu Jul 8 12:34:28 CDT 2010


I'm looking to save complex number to a text file. My code is failing me
miserably. Here's a simpler case of my problem:

Code:

---------------------------------
from numpy import *
from pylab import *


a = [3+2j,5+7j,8+2j]
savetxt("complex.out",a)
---------------------------------

SavedFile:

---------------------------------
3.000000000000000000e+00
5.000000000000000000e+00
8.000000000000000000e+00
---------------------------------


Need Complex numbers in the saved file.

Thanks in advance!
-Chris Frazer



More information about the SciPy-User mailing list