[Numpy-discussion] record array with array elements

Igor Sylvester igorsyl@gmail....
Tue Jan 6 14:07:56 CST 2009


Shouldn't the itemsize below be 2?

>>> import numpy as np
>>> dtype = np.dtype( [ (((2,), 'top'), [('nested', 'i1')]) ] )
>>> dtype.itemsize
>>> np.__version__

The elements of the dtype are of type array of size 2.  Each element is a
(nested) record array of size 2 with one field of type 'i1'.  In contiguous
memory, this should look identical to an 'i1' array of size 2.

-Igor Sylvester
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090106/abfc0a01/attachment.html 

More information about the Numpy-discussion mailing list