Picked up via python/cpython#31. This is more of a design mistake than a bug, as it's not clear who made the right decision
# a c long on this platform is indeed 8 bytes
>>> np.dtype('l').itemsize
8
>>> struct.calcsize('l')
8
# but when an endian mark is specified, l always means 4 bytes to the struct module
>>> np.dtype('>l').itemsize
8
>>> struct.calcsize('>l')
4
Note that this only occurs on platforms where sizeof(long) == 64, ie not 64-bit windows.
Do we care about consistency with struct? If not, then we need to document that we are not consistent with it.
For searchability: PEP3118
Picked up via python/cpython#31. This is more of a design mistake than a bug, as it's not clear who made the right decision
Note that this only occurs on platforms where
sizeof(long) == 64, ie not 64-bit windows.Do we care about consistency with
struct? If not, then we need to document that we are not consistent with it.For searchability: PEP3118