summaryrefslogtreecommitdiff
path: root/numpy/array_api/_constants.py
diff options
context:
space:
mode:
authorMatthew Barber <quitesimplymatt@gmail.com>2022-05-06 09:27:27 +0000
committerGitHub <noreply@github.com>2022-05-06 11:27:27 +0200
commitbefef7b26773eddd2b656a3ab87f504e6cc173db (patch)
tree95c9ea72750052d759f87f35abe43019f0478b71 /numpy/array_api/_constants.py
parentba54f569cecf17812695f17812d238af2bb91000 (diff)
downloadnumpy-befef7b26773eddd2b656a3ab87f504e6cc173db.tar.gz
API: Allow newaxis indexing for `array_api` arrays (#21377)
* TST: Add test checking if newaxis indexing works for `array_api` Also removes previous check against newaxis indexing, which is now outdated * TST, BUG: Allow `None` in `array_api` indexing Introduces test for validating flat indexing when `None` is present * MAINT,DOC,TST: Rework of `_validate_index()` in `numpy.array_api` _validate_index() is now called as self._validate_index(shape), and does not return a key. This rework removes the recursive pattern used. Tests are introduced to cover some edge cases. Additionally, its internal docstring reflects new behaviour, and extends the flat indexing note. * MAINT: `advance` -> `advanced` (integer indexing) Co-authored-by: Aaron Meurer <asmeurer@gmail.com> * BUG: array_api arrays use internal arrays from array_api array keys When an array_api array is passed as the key for get/setitem, we access the key's internal np.ndarray array to be used as the key for the internal get/setitem operation. This behaviour was initially removed when `_validate_index()` was reworked. * MAINT: Better flat indexing error message for `array_api` arrays Also better semantics for its prior ellipsis count condition Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net> * MAINT: `array_api` arrays don't special case multi-ellipsis errors This gets handled by NumPy-proper. Co-authored-by: Aaron Meurer <asmeurer@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Diffstat (limited to 'numpy/array_api/_constants.py')
0 files changed, 0 insertions, 0 deletions