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

Method test_mean_axis_error

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

Source from the content-addressed store, hash-verified

6235 assert_(_mean(np.ones(100000, dtype='float16')) == 1)
6236
6237 def test_mean_axis_error(self):
6238 # Ensure that AxisError is raised instead of IndexError when axis is
6239 # out of bounds, see gh-15817.
6240 with assert_raises(np.exceptions.AxisError):
6241 np.arange(10).mean(axis=2)
6242
6243 def test_mean_where(self):
6244 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