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

Method test_raise

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

Source from the content-addressed store, hash-verified

5969 self.tst_basic(x.astype("S3"))
5970
5971 def test_raise(self):
5972 x = np.random.random(24) * 100
5973 x = x.reshape((2, 3, 4))
5974 assert_raises(IndexError, x.take, [0, 1, 2], axis=0)
5975 assert_raises(IndexError, x.take, [-3], axis=0)
5976 assert_array_equal(x.take([-1], axis=0)[0], x[1])
5977
5978 def test_clip(self):
5979 x = np.random.random(24) * 100

Callers

nothing calls this directly

Calls 5

assert_raisesFunction · 0.90
assert_array_equalFunction · 0.90
randomMethod · 0.80
reshapeMethod · 0.80
takeMethod · 0.80

Tested by

no test coverage detected