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

Method test_var_axis_error

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

Source from the content-addressed store, hash-verified

6319 assert_almost_equal(cmat.var(), cmat_swapped.var())
6320
6321 def test_var_axis_error(self):
6322 # Ensure that AxisError is raised instead of IndexError when axis is
6323 # out of bounds, see gh-15817.
6324 with assert_raises(np.exceptions.AxisError):
6325 np.arange(10).var(axis=2)
6326
6327 def test_var_where(self):
6328 a = np.arange(25).reshape((5, 5))

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
varMethod · 0.45

Tested by

no test coverage detected