MCPcopy Index your code
hub / github.com/numpy/numpy / test_empty

Method test_empty

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

Source from the content-addressed store, hash-verified

2608 assert_allclose(cov(x, y), np.array([[1., -1.j], [1.j, 1.]]))
2609
2610 def test_empty(self):
2611 with warnings.catch_warnings(record=True):
2612 warnings.simplefilter('always', RuntimeWarning)
2613 assert_array_equal(cov(np.array([])), np.nan)
2614 assert_array_equal(cov(np.array([]).reshape(0, 2)),
2615 np.array([]).reshape(0, 0))
2616 assert_array_equal(cov(np.array([]).reshape(2, 0)),
2617 np.array([[np.nan, np.nan], [np.nan, np.nan]]))
2618
2619 def test_wrong_ddof(self):
2620 with warnings.catch_warnings(record=True):

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
covFunction · 0.90
reshapeMethod · 0.80

Tested by

no test coverage detected