Skip to content

Commit 986ba27

Browse files
committed
Clarify when __index__() is applicable for arrays-as-keys in indexing
1 parent ef9c4c1 commit 986ba27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/array_api_stubs/_draft/array_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def __getitem__(
627627
628628
629629
.. note::
630-
``key`` can only be an array if it is valid for boolean array indexing, or supports ``__index__()``.
630+
``key`` can only be an array if it is valid for boolean array indexing, or when it supports ``__index__()`` as a 0-dimensional integer array.
631631
632632
Returns
633633
-------
@@ -1107,7 +1107,7 @@ def __setitem__(
11071107
11081108
11091109
.. note::
1110-
``key`` can only be an array if it is valid for boolean array indexing, or supports ``__index__()``.
1110+
``key`` can only be an array if it is valid for boolean array indexing, or when it supports ``__index__()`` as a 0-dimensional integer array.
11111111
11121112
.. note::
11131113

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy