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

Method test_single_item_array

numpy/lib/tests/test_function_base.py:1075–1083  ·  view source on GitHub ↗
(self, indexer)

Source from the content-addressed store, hash-verified

1073
1074 @pytest.mark.parametrize("indexer", [np.array([1]), [1]])
1075 def test_single_item_array(self, indexer):
1076 a, nd_a = self._create_arrays()
1077 a_del_int = delete(a, 1)
1078 a_del = delete(a, indexer)
1079 assert_equal(a_del_int, a_del)
1080
1081 nd_a_del_int = delete(nd_a, 1, axis=1)
1082 nd_a_del = delete(nd_a, np.array([1]), axis=1)
1083 assert_equal(nd_a_del_int, nd_a_del)
1084
1085 def test_single_item_array_non_int(self):
1086 # Special handling for integer arrays must not affect non-integer ones.

Callers

nothing calls this directly

Calls 3

_create_arraysMethod · 0.95
deleteFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected