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

Function test_error_on_invalid_index

numpy/array_api/tests/test_array_object.py:360–363  ·  view source on GitHub ↗
(shape, index)

Source from the content-addressed store, hash-verified

358@pytest.mark.parametrize("shape", [(), (5,), (3, 3, 3)])
359@pytest.mark.parametrize("index", ["string", False, True])
360def test_error_on_invalid_index(shape, index):
361 a = ones(shape)
362 with pytest.raises(IndexError):
363 a[index]
364
365def test_mask_0d_array_without_errors():
366 a = ones(())

Callers

nothing calls this directly

Calls 1

onesFunction · 0.50

Tested by

no test coverage detected