[Numpy-discussion] What is a numpy.long type?
Chris Barker - NOAA Federal
Fri Aug 23 09:59:47 CDT 2013
On Aug 22, 2013, at 11:57 PM, David Cournapeau <firstname.lastname@example.org> wrote:
npy_long is indeed just an alias to C long,
Which means it's likely broken on 32 bit platforms and 64 bit MSVC.
np.long is an alias to python's long:
But python's long is an unlimited type--it can't be mapped to a c type at
arch -32 python -c "import numpy as np; print np.dtype(np.int); print
So this is giving us a 64 bit int--not a bad compromise, but not a python
long--I've got to wonder why the alias is there at all.
arch -64 python -c "import numpy as np; print np.dtype(np.int); print
Same thing on 64 bit.
So while np.long is an alias to python long--it apparently is translated
internally as 64 bit -- everywhere?
So apparently there is no way to get a "platform long". ( or, for that
matter, a platform anything else, it's just that there is more consistancy
among common platforms for the others)
All this is on python 2.7, I am not sure how/if that changes on python 3
(that consolidated python int/long).
> Christopher Barker, Ph.D.
> Emergency Response Division
> NOAA/NOS/OR&R (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
> NumPy-Discussion mailing list
NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion