Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 456d186

Browse files
lucascolleykgryte
andauthored
docs: clarify behavior when providing a zero-dimensional array to take
PR-URL: #876 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]>
1 parent 7757e67 commit 456d186

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/array_api_stubs/_draft/indexing_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def take(x: array, indices: array, /, *, axis: Optional[int] = None) -> array:
1313
Parameters
1414
----------
1515
x: array
16-
input array.
16+
input array. Should have one or more dimensions (axes).
1717
indices: array
1818
array indices. The array must be one-dimensional and have an integer data type.
1919
@@ -33,6 +33,8 @@ def take(x: array, indices: array, /, *, axis: Optional[int] = None) -> array:
3333
Notes
3434
-----
3535
36+
- When ``x`` is a zero-dimensional array, behavior is unspecified and thus implementation-defined.
37+
3638
.. versionadded:: 2022.12
3739
3840
.. versionchanged:: 2023.12

0 commit comments

Comments
 (0)