MCPcopy
hub / github.com/numpy/numpy / test_wrap

Method test_wrap

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

Source from the content-addressed store, hash-verified

5982 assert_array_equal(x.take([2], axis=0, mode='clip')[0], x[1])
5983
5984 def test_wrap(self):
5985 x = np.random.random(24) * 100
5986 x = x.reshape((2, 3, 4))
5987 assert_array_equal(x.take([-1], axis=0, mode='wrap')[0], x[1])
5988 assert_array_equal(x.take([2], axis=0, mode='wrap')[0], x[0])
5989 assert_array_equal(x.take([3], axis=0, mode='wrap')[0], x[1])
5990
5991 @pytest.mark.parametrize('dtype', ('>i4', '<i4'))
5992 def test_byteorder(self, dtype):

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected