summaryrefslogtreecommitdiff
path: root/numpy/ma/tests/test_extras.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-03-22 23:10:43 +0000
committerEric Wieser <wieser.eric@gmail.com>2017-05-05 21:36:03 +0100
commite6b8e75547af0cc4d38af458eff5e5d6c14102b8 (patch)
treeddb9dc76e81382ccce6d7f5f28c2f558b3658fa5 /numpy/ma/tests/test_extras.py
parent69b0c42bca27dd5d5522de306bcd7db7deccbfad (diff)
downloadpython-numpy-e6b8e75547af0cc4d38af458eff5e5d6c14102b8.tar.gz
python-numpy-e6b8e75547af0cc4d38af458eff5e5d6c14102b8.tar.bz2
python-numpy-e6b8e75547af0cc4d38af458eff5e5d6c14102b8.zip
MAINT: Remove code duplicated from np.r_ in np.ma.mr_
Also adds a test for the disabled-by-design behaviour - this would return raw matrices, not masked arrays
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r--numpy/ma/tests/test_extras.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py
index e7ebd8b82..7de21ff59 100644
--- a/numpy/ma/tests/test_extras.py
+++ b/numpy/ma/tests/test_extras.py
@@ -14,7 +14,8 @@ import itertools
import numpy as np
from numpy.testing import (
- TestCase, run_module_suite, assert_warns, suppress_warnings
+ TestCase, run_module_suite, assert_warns, suppress_warnings,
+ assert_raises
)
from numpy.ma.testutils import (
assert_, assert_array_equal, assert_equal, assert_almost_equal
@@ -304,6 +305,8 @@ class TestConcatenator(TestCase):
assert_array_equal(d[5:,:], b_2)
assert_array_equal(d.mask, np.r_[m_1, m_2])
+ def test_matrix_builder(self):
+ assert_raises(np.ma.MAError, lambda: mr_['1, 2; 3, 4'])
class TestNotMasked(TestCase):
# Tests notmasked_edges and notmasked_contiguous.