(self)
| 1321 | assert_almost_equal(corrcoef(x, y, ddof=3), expected2) |
| 1322 | |
| 1323 | def test_bias(self): |
| 1324 | x, y = self.data, self.data2 |
| 1325 | expected = np.corrcoef(x) |
| 1326 | # bias raises DeprecationWarning |
| 1327 | with suppress_warnings() as sup: |
| 1328 | warnings.simplefilter("always") |
| 1329 | assert_warns(DeprecationWarning, corrcoef, x, y, True, False) |
| 1330 | assert_warns(DeprecationWarning, corrcoef, x, y, True, True) |
| 1331 | assert_warns(DeprecationWarning, corrcoef, x, bias=False) |
| 1332 | sup.filter(DeprecationWarning, "bias and ddof have no effect") |
| 1333 | # bias has no or negligible effect on the function |
| 1334 | assert_almost_equal(corrcoef(x, bias=1), expected) |
| 1335 | |
| 1336 | def test_1d_without_missing(self): |
| 1337 | # Test cov on 1D variable w/o missing values |
nothing calls this directly
no test coverage detected