summaryrefslogtreecommitdiff
path: root/numpy/array_api/tests/test_array_object.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2020-08-06 17:20:24 -0600
committerGitHub <noreply@github.com>2020-08-06 18:20:24 -0500
commit29e2293844e0ac2772b1382ab0ec6a35543954de (patch)
tree9c2ad06f6890fb3115d7e0c37c3e247185770502 /numpy/array_api/tests/test_array_object.py
parent3023d06a05136bf8345e781cc11a01d776a9f314 (diff)
downloadnumpy-29e2293844e0ac2772b1382ab0ec6a35543954de.tar.gz
BUG: Raise correct errors in boolean indexing fast path (gh-17010)
Previously the logic assumed that an index was valid if the size was the same as the indexed array, rather than the shape. This resulted in an index being incorrectly allowed if the index was all False, like np.empty((3, 3))[np.full((1, 9), False)], or incorrectly giving a ValueError about broadcasting if the index was not all False (like np.empty((3, 3))[np.full((1, 9), True)]). Now these examples both give IndexError with the usual error message. Fixes #16997.
Diffstat (limited to 'numpy/array_api/tests/test_array_object.py')
0 files changed, 0 insertions, 0 deletions