[Numpy-discussion] Change in the representation of complex numbers in NumPy 1.1
Francesc Alted
falted at pytables.org
Wed Jul 2 09:12:23 EDT 2008
Hi,
I've seen that NumPy has changed the representation of complex numbers
starting with NumPy 1.1. Before, it was:
>>> numpy.__version__
'1.0.3'
>>> repr(numpy.complex(0)) # The Python type
'0j'
>>> repr(numpy.complex128(0)) # The NumPy type
'0j'
Now, it is:
>>> numpy.__version__
'1.2.0.dev5313'
>>> repr(numpy.complex(0))
'0j'
>>> repr(numpy.complex128(0))
'(0.0+0.0j)'
Not that I don't like the new way, but that broke a couple of tests of
the PyTables suite, and before fixing it, I'd like to know if the new
way would stay. Also, I'm not certain why you have chosen a different
representation than the Python type.
Thanks,
--
Francesc Alted
More information about the NumPy-Discussion
mailing list