MCPcopy
hub / github.com/numpy/numpy / test_mean_axis_error

Method test_mean_axis_error

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

Source from the content-addressed store, hash-verified

7200 assert_(_mean(np.ones(100000, dtype='float16')) == 1)
7201
7202 def test_mean_axis_error(self):
7203 # Ensure that AxisError is raised instead of IndexError when axis is
7204 # out of bounds, see gh-15817.
7205 with assert_raises(np.exceptions.AxisError):
7206 np.arange(10).mean(axis=2)
7207
7208 def test_mean_where(self):
7209 a = np.arange(16).reshape((4, 4))

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
meanMethod · 0.45

Tested by

no test coverage detected