Skip to content

Commit bda9c48

Browse files
authored
Add note clarifying behavior for out-of-bounds indices in take
PR-URL: data-apis#701
1 parent 1fd3429 commit bda9c48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/array_api_stubs/_draft/indexing_functions.py

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ def take(x: array, indices: array, /, *, axis: Optional[int] = None) -> array:
1616
input array.
1717
indices: array
1818
array indices. The array must be one-dimensional and have an integer data type.
19+
20+
.. note::
21+
This specification does not require bounds checking. The behavior for out-of-bounds indices is left unspecified.
22+
1923
axis: int
2024
axis over which to select values. If ``axis`` is negative, the function must determine the axis along which to select values by counting from the last dimension.
2125

0 commit comments

Comments
 (0)