[Numpy-discussion] np.longlong casts to int
Matthew Brett
matthew.brett@gmail....
Wed Feb 22 16:47:46 CST 2012
Hi,
I was gaily using np.longlong for casting to the highest available
float type when I noticed this:
In [4]: np.array([2.1], dtype=np.longlong)
Out[4]: array([2], dtype=int64)
whereas:
In [5]: np.array([2.1], dtype=np.float128)
Out[5]: array([ 2.1], dtype=float128)
This on OSX snow leopard numpies 1.2 .1 -> current devel and OSX tiger
PPC recent devel.
I had the impression that np.float128 and np.longlong would be
identical in behavior - but I guess not?
Best,
Matthew
More information about the NumPy-Discussion
mailing list