[Numpy-discussion] arr.dtype.kind is 'i' for dtype=unit !?

Sebastian Haase haase at msg.ucsf.edu
Tue Sep 19 17:23:44 CDT 2006


OK - I'm really sorry !!
I also get 'u' -- I had a typo there ... 

But what is the complete list of kind values ?

-Sebastian


On Tuesday 19 September 2006 11:54, Scott Ransom wrote:
> > > Can anybody on a 64-bit system confirm?
> >
> > I'm on 64-bit Debian:
> >
> > In [11]: arr=N.arange(10,dtype=N.uint)
> >
> > In [12]: arr.dtype.kind
> > Out[12]: 'u'
> >
> > In [13]: arr.dtype.itemsize
> > Out[13]: 4
> >
> > In [14]: arr=N.arange(10,dtype=N.long)
> >
> > In [15]: arr.dtype.kind
> > Out[15]: 'i'
> >
> > In [16]: arr.dtype.itemsize
> > Out[16]: 8
>
> Ack!  That was on the wrong machine (32-bit Debian).  Here is the 64-bit
> version:
>
> In [2]: arr=N.arange(10,dtype=N.uint)
>
> In [3]: arr.dtype.kind
> Out[3]: 'u'
>
> In [4]: arr.dtype.itemsize
> Out[4]: 8
>
> In [5]: arr=N.arange(10,dtype=N.long)
>
> In [6]: arr.dtype.kind
> Out[6]: 'i'
>
> In [7]: arr.dtype.itemsize
> Out[7]: 8
>
> Sorry about that,
>
> Scott




More information about the Numpy-discussion mailing list