MCPcopy Create free account
hub / github.com/numpy/numpy / test_std_values

Method test_std_values

numpy/core/tests/test_multiarray.py:6364–6369  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6362 assert_equal(np.var(a, where=False), np.nan)
6363
6364 def test_std_values(self):
6365 for mat in [self.rmat, self.cmat, self.omat]:
6366 for axis in [0, 1, None]:
6367 tgt = np.sqrt(_var(mat, axis=axis))
6368 res = _std(mat, axis=axis)
6369 assert_almost_equal(res, tgt)
6370
6371 def test_std_where(self):
6372 a = np.arange(25).reshape((5,5))[::-1]

Callers

nothing calls this directly

Calls 3

assert_almost_equalFunction · 0.90
_varFunction · 0.70
_stdFunction · 0.70

Tested by

no test coverage detected