-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Open
Description
>>> x = np.array([(0, 1, 0)] * 10, dtype=[('f0', '<i4'), ('f1', '<i4'), ('f2', '<i4')])
>>> x == x
array([ True, True, True, True, True, True, True, True, True, True], dtype=bool)
>>> np.equal(x, x)
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
NotImplementedPresumably this has ramifications for users overloading __array_ufunc__ with @shoyer's mixin class, causing operations to fail on structured dtypes - as these do not pass through ndarray.__eq__, which seems to special case things to make them work