summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_array_object.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/_array_api/_array_object.py')
-rw-r--r--numpy/_array_api/_array_object.py2
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