[Numpy-discussion] integer array creation oddity

Suchindra Sandhu suchindra@gmail....
Fri Jul 18 16:41:22 CDT 2008


Hi,

Can someone please explain to me this oddity?

In [1]: import numpy as n

In [8]: a = n.array((1,2,3), 'i')

In [9]: type(a[0])
Out[9]: <type 'numpy.int32'>

In [10]: type(a[0]) == n.int32
Out[10]: False

When I create an array with 'int', 'int32' etc it works fine

What is the type of 'i' and what is n.int0?

Thanks,
Suchindra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080718/52ed008f/attachment.html 


More information about the Numpy-discussion mailing list