summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/ma/tests/test_core.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
index 217f307c6..fc9ced365 100644
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -2998,6 +2998,10 @@ class TestMaskedArrayMethods(TestCase):
assert_equal(x.take([[0, 1], [0, 1]]),
masked_array([[10, 20], [10, 20]], [[0, 1], [0, 1]]))
+ # assert_equal crashes when passed np.ma.mask
+ self.assertIs(x[1], np.ma.masked)
+ self.assertIs(x.take(1), np.ma.masked)
+
x = array([[10, 20, 30], [40, 50, 60]], mask=[[0, 0, 1], [1, 0, 0, ]])
assert_equal(x.take([0, 2], axis=1),
array([[10, 30], [40, 60]], mask=[[0, 1], [1, 0]]))