diff options
Diffstat (limited to 'numpy/ma')
-rw-r--r-- | numpy/ma/tests/test_extras.py | 2 | ||||
-rw-r--r-- | numpy/ma/testutils.py | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py index 6138d0573..c2428fa10 100644 --- a/numpy/ma/tests/test_extras.py +++ b/numpy/ma/tests/test_extras.py @@ -154,7 +154,7 @@ class TestAverage(TestCase): ott = ott.reshape(2, 2) ott[:, 1] = masked assert_equal(average(ott, axis=0), [2.0, 0.0]) - assert_equal(average(ott, axis=1).mask[0], [True]) + assert_equal(average(ott, axis=1).mask[0], True) assert_equal([2., 0.], average(ott, axis=0)) result, wts = average(ott, axis=0, returned=1) assert_equal(wts, [1., 0.]) diff --git a/numpy/ma/testutils.py b/numpy/ma/testutils.py index 8dc821878..40b9fa1be 100644 --- a/numpy/ma/testutils.py +++ b/numpy/ma/testutils.py @@ -125,10 +125,7 @@ def assert_equal(actual, desired, err_msg=''): if isinstance(desired, (list, tuple)) and isinstance(actual, (list, tuple)): return _assert_equal_on_sequences(actual, desired, err_msg='') if not (isinstance(actual, ndarray) or isinstance(desired, ndarray)): - msg = build_err_msg([actual, desired], err_msg,) - if not desired == actual: - raise AssertionError(msg) - return + return utils.assert_equal(actual, desired) # Case #4. arrays or equivalent if ((actual is masked) and not (desired is masked)) or \ ((desired is masked) and not (actual is masked)): |