[Numpy-discussion] Recarray comparison and byte order

Matthew Brett matthew.brett@gmail....
Sat Oct 31 11:38:34 CDT 2009


Hi,

I was surprised by this - is it a bug or a feature or me
misunderstanding something?

a = np.zeros((1,), dtype=[('f1', 'u2')])
b = a.copy()
b == a
(array([True], dtype=bool)) # as expected
c = a.byteswap().newbyteorder()
c == a
(False) # to me, unexpected, note bool rather than array

Thanks for any clarification...

Matthew


More information about the NumPy-Discussion mailing list