summaryrefslogtreecommitdiff
path: root/numpy/ma/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/ma/tests')
-rw-r--r--numpy/ma/tests/test_regression.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_regression.py b/numpy/ma/tests/test_regression.py
index f713a8a1a..eb301aa05 100644
--- a/numpy/ma/tests/test_regression.py
+++ b/numpy/ma/tests/test_regression.py
@@ -61,6 +61,14 @@ class TestRegression(TestCase):
a.var(out=mout)
assert_(mout._data == 0)
+ def test_ddof_corrcoef(self):
+ # See gh-3336
+ x = np.ma.masked_equal([1,2,3,4,5], 4)
+ y = np.array([2,2.5,3.1,3,5])
+ 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)
+ assert_allclose(r0.data, r1.data)
if __name__ == "__main__":
run_module_suite()