[Numpy-discussion] Equality of dtypes does not imply equality of type kinds

Chris Barker chris.barker at noaa.gov
Tue Jan 13 17:56:56 EST 2015


On Mon, Jan 12, 2015 at 7:23 PM, Alexander Belopolsky <ndarray at mac.com>
wrote:

>
> On Mon, Jan 12, 2015 at 8:48 PM, Charles R Harris <
> charlesr.harris at gmail.com> wrote:
> >  I've often fantasized getting rid of the long type altogether ;) So it
> isn't exactly intended, but there is a reason...
>
>
> It is also confusing that numpy has two constructors that produce 32-bit
> integers on 32-bit platforms and 64-bit integers on 64-bit platforms, but
> neither of these constructors is called "long".  Instead, they are called
> numpy.int_ and numpy.intp.
>

I'm pretty sure that numpy.int_ will produce a 32 bit type in Windows64 --
because a long on Windows64 is 32 bit (at least with the MS compiler).

Which sucks, I'm pretty amazed that python went with "platformlong" for
it's int, rather than "32 bit int" or "64 bit int". Sigh.

-CHB




-- 

Christopher Barker, Ph.D.
Oceanographer

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

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150113/daa00f00/attachment.html>


More information about the NumPy-Discussion mailing list