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

Scott Ransom sransom at nrao.edu
Tue Sep 19 13:54:03 CDT 2006


> > 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

-- 
Scott M. Ransom            Address:  NRAO
Phone:  (434) 296-0320               520 Edgemont Rd.
email:  sransom at nrao.edu             Charlottesville, VA 22903 USA
GPG Fingerprint: 06A9 9553 78BE 16DB 407B  FFCA 9BFA B6FF FFD3 2989




More information about the Numpy-discussion mailing list