8000 TST: Verify np.ma.take works on scalars · numpy/numpy@6e5aa5e · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6e5aa5e

Browse files
committed
TST: Verify np.ma.take works on scalars
See #7585
1 parent 3c394f7 commit 6e5aa5e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numpy/ma/tests/test_core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2998,6 +2998,10 @@ def test_take(self):
29982998
assert_equal(x.take([[0, 1], [0, 1]]),
29992999
masked_array([[10, 20], [10, 20]], [[0, 1], [0, 1]]))
30003000

3001+
# assert_equal crashes when passed np.ma.mask
3002+
self.assertIs(x[1], np.ma.masked)
3003+
self.assertIs(x.take(1), np.ma.masked)
3004+
30013005
x = array([[10, 20, 30], [40, 50, 60]], mask=[[0, 0, 1], [1, 0, 0, ]])
30023006
assert_equal(x.take([0, 2], axis=1),
30033007
array([[10, 30], [40, 60]], mask=[[0, 1], [1, 0]]))

0 commit comments

Comments
 (0)
0