(self)
| 1386 | corrcoef(x, x[::-1], ddof=2)) |
| 1387 | |
| 1388 | def test_2d_with_missing(self): |
| 1389 | # Test corrcoef on 2D variable w/ missing value |
| 1390 | x = self.data |
| 1391 | x[-1] = masked |
| 1392 | x = x.reshape(3, 4) |
| 1393 | |
| 1394 | test = corrcoef(x) |
| 1395 | control = np.corrcoef(x) |
| 1396 | assert_almost_equal(test[:-1, :-1], control[:-1, :-1]) |
| 1397 | with suppress_warnings() as sup: |
| 1398 | sup.filter(DeprecationWarning, "bias and ddof have no effect") |
| 1399 | # ddof and bias have no or negligible effect on the function |
| 1400 | assert_almost_equal(corrcoef(x, ddof=-2)[:-1, :-1], |
| 1401 | control[:-1, :-1]) |
| 1402 | assert_almost_equal(corrcoef(x, ddof=3)[:-1, :-1], |
| 1403 | control[:-1, :-1]) |
| 1404 | assert_almost_equal(corrcoef(x, bias=1)[:-1, :-1], |
| 1405 | control[:-1, :-1]) |
| 1406 | |
| 1407 | |
| 1408 | class TestPolynomial: |
nothing calls this directly
no test coverage detected