MCPcopy
hub / github.com/numpy/numpy / test_var_axis_error

Method test_var_axis_error

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

Source from the content-addressed store, hash-verified

7288 assert_almost_equal(cmat.var(), cmat_swapped.var())
7289
7290 def test_var_axis_error(self):
7291 # Ensure that AxisError is raised instead of IndexError when axis is
7292 # out of bounds, see gh-15817.
7293 with assert_raises(np.exceptions.AxisError):
7294 np.arange(10).var(axis=2)
7295
7296 def test_var_where(self):
7297 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