diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-07-15 16:36:26 -0600 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2021-07-15 16:36:26 -0600 |
| commit | b58fbd24783b29d377427e837d189fa039422c9a (patch) | |
| tree | 175e5e5955a19f476a705e7e42656284d88ed2d5 /numpy/_array_api/_array_object.py | |
| parent | 49bd66076439a1de85c9924d800546973c857f95 (diff) | |
| download | numpy-b58fbd24783b29d377427e837d189fa039422c9a.tar.gz | |
Correct disallow things like a[(0, 1), (0, 1)] in the array API namespace
Diffstat (limited to 'numpy/_array_api/_array_object.py')
| -rw-r--r-- | numpy/_array_api/_array_object.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py index 7b5531b9b..6e451ab7a 100644 --- a/numpy/_array_api/_array_object.py +++ b/numpy/_array_api/_array_object.py @@ -320,6 +320,8 @@ class Array: if len(key) == 1: return key raise IndexError("Boolean array indices combined with other indices are not allowed in the array API namespace") + if isinstance(idx, tuple): + raise IndexError("Nested tuple indices are not allowed in the array API namespace") if shape is None: return key |
