summaryrefslogtreecommitdiff
path: root/numpy/matrixlib/defmatrix.py
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2017-02-08 22:17:49 -0500
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2017-02-27 11:24:17 -0500
commitf3f91be7920f52cd6abace64d7e14b876e5f054f (patch)
treee562c7ef7c2884cf059d2ddd8c618fd8c00d0464 /numpy/matrixlib/defmatrix.py
parentad8afe82e7b7643607a348c0e02b45c9131c6a06 (diff)
downloadnumpy-f3f91be7920f52cd6abace64d7e14b876e5f054f.tar.gz
BUG: MaskedArray __eq__ wrong for masked scalar, multi-d recarray
In the process of trying to fix the "questionable behaviour in `MaskedArray.__eq__`" (gh-8589), it became clear that the code was buggy. E.g., `ma == ma[0]` failed if `ma` held a structured dtype; multi-d structured dtypes failed generally; and, more worryingly, a masked scalar comparison could be wrong: `np.ma.MaskedArray(1, mask=True) == 0` yields True. This commit solves these problems, adding tests to prevent regression. In the process, it also ensures that the results for structured arrays always equals what one would get by logically combining the results over individual parts of the structure.
Diffstat (limited to 'numpy/matrixlib/defmatrix.py')
0 files changed, 0 insertions, 0 deletions