[Numpy-discussion] record array with array elements
Igor Sylvester
igorsyl at gmail.com
Tue Jan 6 15:07:56 EST 2009
Everyone,
Shouldn't the itemsize below be 2?
>>> import numpy as np
>>> dtype = np.dtype( [ (((2,), 'top'), [('nested', 'i1')]) ] )
>>> dtype.itemsize
1
>>> np.__version__
'1.0.4'
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://mail.python.org/pipermail/numpy-discussion/attachments/20090106/abfc0a01/attachment.html>
More information about the NumPy-Discussion
mailing list