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

Method test_ddof_too_big

numpy/_core/tests/test_multiarray.py:7159–7169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7157 assert_almost_equal(res, tgt)
7158
7159 def test_ddof_too_big(self):
7160 rmat, _, _ = self._create_data()
7161 dim = rmat.shape[1]
7162 for f in [_var, _std]:
7163 for ddof in range(dim, dim + 2):
7164 with warnings.catch_warnings(record=True) as w:
7165 warnings.simplefilter('always')
7166 res = f(rmat, axis=1, ddof=ddof)
7167 assert_(not (res < 0).any())
7168 assert_(len(w) > 0)
7169 assert_(issubclass(w[0].category, RuntimeWarning))
7170
7171 def test_empty(self):
7172 A = np.zeros((0, 3))

Callers

nothing calls this directly

Calls 4

_create_dataMethod · 0.95
assert_Function · 0.90
fFunction · 0.70
anyMethod · 0.45

Tested by

no test coverage detected