summaryrefslogtreecommitdiff
path: root/numpy/ma/tests/test_extras.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-12-12 11:40:55 -0700
committerGitHub <noreply@github.com>2017-12-12 11:40:55 -0700
commit22d917776b80dc7cef683fc17f4ea15b1ce98fcc (patch)
treee0c54af1bcec936d9a3cc12f5b0012d7f5a1ff0f /numpy/ma/tests/test_extras.py
parent0300a3d32ad70f7ce23054360852d872bacca46f (diff)
parente7d571396e92b670a0e8de6e50366ba1dbee3c6e (diff)
downloadnumpy-22d917776b80dc7cef683fc17f4ea15b1ce98fcc.tar.gz
Merge pull request #10207 from eric-wieser/np.r_-scalars
ENH: Allow np.r_ to accept 0d arrays
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r--numpy/ma/tests/test_extras.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py
index 1bec584c1..af9f42c2a 100644
--- a/numpy/ma/tests/test_extras.py
+++ b/numpy/ma/tests/test_extras.py
@@ -316,6 +316,15 @@ class TestConcatenator(object):
assert_equal(type(actual), type(expected))
assert_equal(type(actual.data), type(expected.data))
+ def test_masked_constant(self):
+ actual = mr_[np.ma.masked, 1]
+ assert_equal(actual.mask, [True, False])
+ assert_equal(actual.data[1], 1)
+
+ actual = mr_[[1, 2], np.ma.masked]
+ assert_equal(actual.mask, [False, False, True])
+ assert_equal(actual.data[:2], [1, 2])
+
class TestNotMasked(object):
# Tests notmasked_edges and notmasked_contiguous.