Closed
Description
Original ticket http://projects.scipy.org/numpy/ticket/1662 on 2010-11-05 by @mwiebe, assigned to unknown.
The current floating-point nonzero() implementation is incorrect for non-native byte order. Swapping the order should have no effect, but it can change the result as visible here:
>>> import numpy as np
>>> a = np.array([0x80000000, 0x00000080, 0], dtype=np.uint32)
>>> a.dtype = np.float32
>>> print a.nonzero()
(array([1]),)
>>> print a.byteswap().newbyteorder().nonzero()
(array([0]),)