[Numpy-discussion] correct sizeof for ndarray
Jason Newton
nevion at gmail.com
Tue Oct 20 00:05:51 EDT 2015
Hi folks,
I noticed an unexpected behavior of itemsize for structures with offsets
that are larger than that of a packed structure in memory. This matters
when parsing in memory structures from C and some others (recently and
HDF5/h5py detail got me for a bit).
So what is the correct way to get "sizeof" a structure? AFAIK this is the
size of the last item + it's offset. If this doesn't exist... shouldn't it?
Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151020/9059fe53/attachment.html>
More information about the NumPy-Discussion
mailing list