[Numpy-discussion] Re: dtype: hashing and cmp
Robert Kern
robert.kern at gmail.com
Sun May 28 13:04:03 EDT 2006
Simon Burton wrote:
> On Sun, 28 May 2006 14:33:37 -0500
> Robert Kern <robert.kern at gmail.com> wrote:
>
>>>if array.dtype == numpy.Int32: ...
>>
>>numpy.int32
>
> No that doesn't work.
>
>>>>numpy.int32
>
> <type 'int32scalar'>
>
>>>>numpy.int32 == numpy.dtype('l')
>
> False
>>> from numpy import *
>>> a = linspace(0, 10, 11)
>>> a.dtype == dtype(float64)
True
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion
mailing list