(self)
| 2294 | assert_allclose(np.corrcoef(x, y), np.array([[1., -1.j], [1.j, 1.]])) |
| 2295 | |
| 2296 | def test_empty(self): |
| 2297 | with warnings.catch_warnings(record=True): |
| 2298 | warnings.simplefilter('always', RuntimeWarning) |
| 2299 | assert_array_equal(corrcoef(np.array([])), np.nan) |
| 2300 | assert_array_equal(corrcoef(np.array([]).reshape(0, 2)), |
| 2301 | np.array([]).reshape(0, 0)) |
| 2302 | assert_array_equal(corrcoef(np.array([]).reshape(2, 0)), |
| 2303 | np.array([[np.nan, np.nan], [np.nan, np.nan]])) |
| 2304 | |
| 2305 | def test_extreme(self): |
| 2306 | x = [[1e-100, 1e100], [1e100, 1e-100]] |
nothing calls this directly
no test coverage detected