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

Method _check_inverse_of_slicing

numpy/lib/tests/test_function_base.py:994–1002  ·  view source on GitHub ↗
(self, indices)

Source from the content-addressed store, hash-verified

992 return a, nd_a
993
994 def _check_inverse_of_slicing(self, indices):
995 a, nd_a = self._create_arrays()
996 a_del = delete(a, indices)
997 nd_a_del = delete(nd_a, indices, axis=1)
998 msg = f'Delete failed for obj: {indices!r}'
999 assert_array_equal(setxor1d(a_del, a[indices, ]), a,
1000 err_msg=msg)
1001 xor = setxor1d(nd_a_del[0, :, 0], nd_a[0, indices, 0])
1002 assert_array_equal(xor, nd_a[0, :, 0], err_msg=msg)
1003
1004 def test_slices(self):
1005 lims = [-6, -2, 0, 1, 2, 4, 5]

Callers 3

test_slicesMethod · 0.95
test_fancyMethod · 0.95
test_singleMethod · 0.95

Calls 4

_create_arraysMethod · 0.95
deleteFunction · 0.90
assert_array_equalFunction · 0.90
setxor1dFunction · 0.90

Tested by

no test coverage detected