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

Method test_std_values

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

Source from the content-addressed store, hash-verified

7331 assert_equal(np.var(a, where=False), np.nan)
7332
7333 def test_std_values(self):
7334 rmat, cmat, omat = self._create_data()
7335 for mat in [rmat, cmat, omat]:
7336 for axis in [0, 1, None]:
7337 tgt = np.sqrt(_var(mat, axis=axis))
7338 res = _std(mat, axis=axis)
7339 assert_almost_equal(res, tgt)
7340
7341 def test_std_where(self):
7342 a = np.arange(25).reshape((5, 5))[::-1]

Callers

nothing calls this directly

Calls 4

_create_dataMethod · 0.95
assert_almost_equalFunction · 0.90
_varFunction · 0.70
_stdFunction · 0.70

Tested by

no test coverage detected