summaryrefslogtreecommitdiff
path: root/numpy/ma/tests/test_regression.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/ma/tests/test_regression.py')
-rw-r--r--numpy/ma/tests/test_regression.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/ma/tests/test_regression.py b/numpy/ma/tests/test_regression.py
index dba74d357..fc6cdfaff 100644
--- a/numpy/ma/tests/test_regression.py
+++ b/numpy/ma/tests/test_regression.py
@@ -4,7 +4,8 @@ import warnings
import numpy as np
from numpy.testing import (assert_, TestCase, assert_array_equal,
- assert_allclose, run_module_suite)
+ assert_allclose, run_module_suite,
+ suppress_warnings)
from numpy.compat import sixu
rlevel = 1
@@ -69,8 +70,9 @@ class TestRegression(TestCase):
# See gh-3336
x = np.ma.masked_equal([1, 2, 3, 4, 5], 4)
y = np.array([2, 2.5, 3.1, 3, 5])
- with warnings.catch_warnings():
- warnings.simplefilter("ignore")
+ # this test can be removed after deprecation.
+ with suppress_warnings() as sup:
+ sup.filter(DeprecationWarning, "bias and ddof have no effect")
r0 = np.ma.corrcoef(x, y, ddof=0)
r1 = np.ma.corrcoef(x, y, ddof=1)
# ddof should not have an effect (it gets cancelled out)