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

Method test_bias

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

Source from the content-addressed store, hash-verified

2272 assert_almost_equal(corrcoef(self.A, self.B, ddof=3), self.res2)
2273
2274 def test_bias(self):
2275 # bias raises DeprecationWarning
2276 with suppress_warnings() as sup:
2277 warnings.simplefilter("always")
2278 assert_warns(DeprecationWarning, corrcoef, self.A, self.B, 1, 0)
2279 assert_warns(DeprecationWarning, corrcoef, self.A, bias=0)
2280 sup.filter(DeprecationWarning)
2281 # bias has no or negligible effect on the function
2282 assert_almost_equal(corrcoef(self.A, bias=1), self.res1)
2283
2284 def test_complex(self):
2285 x = np.array([[1, 2, 3], [1j, 2j, 3j]])

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