Skip to content

Commit 47d5e2e

Browse files
committed
docs: use consistent axis description
1 parent c449b55 commit 47d5e2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/array_api_stubs/_draft/sorting_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def argsort(
1515
x: array
1616
input array. **Should** have a real-valued data type.
1717
axis: int
18-
axis along which to sort. If set to ``-1``, the function **must** sort along the last axis. Default: ``-1``.
18+
axis along which to sort. A valid axis **must** be an integer on the interval ``[-N, N)``, where ``N`` is the number of axes in ``x``. If an axis is specified as a negative integer, the function **must** determine the axis along which to perform the operation by counting backward from the last axis (where ``-1`` refers to the last axis). If provided an invalid axis, the function **must** raise an exception. Default: ``-1``.
1919
descending: bool
2020
sort order. If ``True``, the returned indices **must** sort ``x`` in descending order (by value). If ``False``, the returned indices **must** sort ``x`` in ascending order (by value). Default: ``False``.
2121
stable: bool
@@ -44,7 +44,7 @@ def sort(
4444
x: array
4545
input array. **Should** have a real-valued data type.
4646
axis: int
47-
axis along which to sort. If set to ``-1``, the function **must** sort along the last axis. Default: ``-1``.
47+
axis along which to sort. A valid axis **must** be an integer on the interval ``[-N, N)``, where ``N`` is the number of axes in ``x``. If an axis is specified as a negative integer, the function **must** determine the axis along which to perform the operation by counting backward from the last axis (where ``-1`` refers to the last axis). If provided an invalid axis, the function **must** raise an exception. Default: ``-1``.
4848
descending: bool
4949
sort order. If ``True``, the array **must** be sorted in descending order (by value). If ``False``, the array **must** be sorted in ascending order (by value). Default: ``False``.
5050
stable: bool

0 commit comments

Comments
 (0)