diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-12-11 22:28:35 -0800 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-12-11 22:28:35 -0800 |
commit | d4bc1b6795912391473a56f6e757e39bd7b63676 (patch) | |
tree | 00c9a6cac7fe9c39886fc6a1a6b120dde45e8033 /numpy/ma/tests/test_extras.py | |
parent | 8032cf4762008155fca610fb61092e6c9ecae98b (diff) | |
download | python-numpy-d4bc1b6795912391473a56f6e757e39bd7b63676.tar.gz python-numpy-d4bc1b6795912391473a56f6e757e39bd7b63676.tar.bz2 python-numpy-d4bc1b6795912391473a56f6e757e39bd7b63676.zip |
ENH: Allow np.r_ to accept 0d arrays
Fixes gh-9233
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r-- | numpy/ma/tests/test_extras.py | 9 |
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. |