
Jan. 6, 2009
8:07 p.m.
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