loading complex numbers with numpy.loadtxt
I know that if I want to save and load arrays of complex numbers with numpy, I can use the method described here: How to save and load an array of complex numbers using numpy.savetxt? . Assume however, that someone did not know about this and saved their array numbers with numpy.savetxt("numbers.txt",numbers ), producing a file with entries of the form (0.000000000000000000e+00+-2.691033635430225765e-02j) . In this case numbers_load = numpy.loadtxt("numbers.txt").view(complex) will, predictably, fail in the sense of ValueError: could not convert string to float: (0.000000000000000000e+00+-2