diff options
Diffstat (limited to 'numpy/ma/tests/test_subclassing.py')
-rw-r--r-- | numpy/ma/tests/test_subclassing.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/numpy/ma/tests/test_subclassing.py b/numpy/ma/tests/test_subclassing.py index 146ea3051..fb72ca773 100644 --- a/numpy/ma/tests/test_subclassing.py +++ b/numpy/ma/tests/test_subclassing.py @@ -93,8 +93,12 @@ class TestSubclassing(TestCase): def test_masked_unary_operations(self): "Tests masked_unary_operation" (x, mx) = self.data - self.assertTrue(isinstance(log(mx), mmatrix)) - assert_equal(log(x), np.log(x)) + olderr = np.seterr(divide='ignore') + try: + self.assertTrue(isinstance(log(mx), mmatrix)) + assert_equal(log(x), np.log(x)) + finally: + np.seterr(**olderr) def test_masked_binary_operations(self): "Tests masked_binary_operation" |