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

Method test_raise

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

Source from the content-addressed store, hash-verified

5154 self.tst_basic(x.astype("S3"))
5155
5156 def test_raise(self):
5157 x = np.random.random(24)*100
5158 x.shape = 2, 3, 4
5159 assert_raises(IndexError, x.take, [0, 1, 2], axis=0)
5160 assert_raises(IndexError, x.take, [-3], axis=0)
5161 assert_array_equal(x.take([-1], axis=0)[0], x[1])
5162
5163 def test_clip(self):
5164 x = np.random.random(24)*100

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected