diff options
author | rgommers <ralf.gommers@googlemail.com> | 2011-03-11 00:27:09 +0800 |
---|---|---|
committer | rgommers <ralf.gommers@googlemail.com> | 2011-03-11 08:44:45 +0800 |
commit | 46ce29dedb1005a78a8460eb0ccfd9025152b8da (patch) | |
tree | 83d6035aa89b2edf5f29374f1c3168770cd87253 /numpy/ma/tests/test_subclassing.py | |
parent | 9e28fce21a7bec4c9f1e8c686f63c57ea475c439 (diff) | |
download | numpy-46ce29dedb1005a78a8460eb0ccfd9025152b8da.tar.gz |
TST: fix two divide-by-zero test warnings.
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" |