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

Method test_clip

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

Source from the content-addressed store, hash-verified

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
5165 x.shape = 2, 3, 4
5166 assert_array_equal(x.take([-1], axis=0, mode='clip')[0], x[0])
5167 assert_array_equal(x.take([2], axis=0, mode='clip')[0], x[1])
5168
5169 def test_wrap(self):
5170 x = np.random.random(24)*100

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
randomMethod · 0.80
takeMethod · 0.80

Tested by

no test coverage detected