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

Method test_empty

numpy/_core/tests/test_item_selection.py:172–178  ·  view source on GitHub ↗
(self, dtype, mode)

Source from the content-addressed store, hash-verified

170 @pytest.mark.parametrize("dtype", list(np.typecodes["All"])[1:] + ["i,O"])
171 @pytest.mark.parametrize("mode", ["raise", "wrap", "clip"])
172 def test_empty(self, dtype, mode):
173 arr = np.zeros(1000, dtype=dtype)
174 arr_copy = arr.copy()
175
176 # Allowing empty values like this is weird...
177 np.put(arr, [1, 2, 3], [])
178 assert_array_equal(arr, arr_copy)

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
putMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected