diff options
Diffstat (limited to 'numpy/ma/tests/test_subclassing.py')
-rw-r--r-- | numpy/ma/tests/test_subclassing.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/numpy/ma/tests/test_subclassing.py b/numpy/ma/tests/test_subclassing.py index 54b202684..7014246d4 100644 --- a/numpy/ma/tests/test_subclassing.py +++ b/numpy/ma/tests/test_subclassing.py @@ -96,12 +96,9 @@ class TestSubclassing(TestCase): def test_masked_unary_operations(self): "Tests masked_unary_operation" (x, mx) = self.data - olderr = np.seterr(divide='ignore') - try: + with np.errstate(divide='ignore'): 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" |