[Numpy-discussion] More about data types in NumPy

Francesc Altet faltet at carabos.com
Wed Sep 27 02:48:47 CDT 2006


Sorry for being insistent, but I recognize that I'm having a bad time
with NumPy data type rational. Is there an explanation for this?:

>>> numpy.dtype('i4').type
<type 'numpy.int32'>
>>> numpy.dtype('int32').type
<type 'numpy.int32'>
>>> numpy.dtype('i4').type == numpy.dtype('int32').type

So far so good, but is the next the intended behaviour?

>>> numpy.typeDict['i4']
<type 'numpy.int32'>
>>> numpy.typeDict['int32']
<type 'numpy.int32'>
>>> numpy.typeDict['i4'] == numpy.typeDict['int32']

>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data

More information about the Numpy-discussion mailing list