MCPcopy Create free account
hub / github.com/numpy/numpy / test_ddof

Method test_ddof

numpy/lib/tests/test_function_base.py:2262–2272  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2260 assert_(np.all(np.abs(tgt2) <= 1.0))
2261
2262 def test_ddof(self):
2263 # ddof raises DeprecationWarning
2264 with suppress_warnings() as sup:
2265 warnings.simplefilter("always")
2266 assert_warns(DeprecationWarning, corrcoef, self.A, ddof=-1)
2267 sup.filter(DeprecationWarning)
2268 # ddof has no or negligible effect on the function
2269 assert_almost_equal(corrcoef(self.A, ddof=-1), self.res1)
2270 assert_almost_equal(corrcoef(self.A, self.B, ddof=-1), self.res2)
2271 assert_almost_equal(corrcoef(self.A, ddof=3), self.res1)
2272 assert_almost_equal(corrcoef(self.A, self.B, ddof=3), self.res2)
2273
2274 def test_bias(self):
2275 # bias raises DeprecationWarning

Callers

nothing calls this directly

Calls 5

suppress_warningsClass · 0.90
assert_warnsFunction · 0.90
assert_almost_equalFunction · 0.90
corrcoefFunction · 0.90
filterMethod · 0.80

Tested by

no test coverage detected