You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/array_api_stubs/_draft/sorting_functions.py
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -13,23 +13,23 @@ def argsort(
13
13
Parameters
14
14
----------
15
15
x: array
16
-
input array. *Should* have a real-valued data type.
16
+
input array. **Should** have a real-valued data type.
17
17
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. If set to ``-1``, the function **must** sort along the last axis. Default: ``-1``.
19
19
descending: bool
20
-
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``.
20
+
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``.
21
21
stable: bool
22
-
sort stability. If ``True``, the returned indices *must* maintain the relative order of ``x`` values which compare as equal. If ``False``, the returned indices *may* maintain the relative order of ``x`` values which compare as equal (i.e., the relative order of ``x`` values which compare as equal is implementation-dependent). Default: ``True``.
22
+
sort stability. If ``True``, the returned indices **must** maintain the relative order of ``x`` values which compare as equal. If ``False``, the returned indices **may** maintain the relative order of ``x`` values which compare as equal (i.e., the relative order of ``x`` values which compare as equal is implementation-dependent). Default: ``True``.
23
23
24
24
Returns
25
25
-------
26
26
out: array
27
-
an array of indices. The returned array *must* have the same shape as ``x``. The returned array *must* have the default array index data type.
27
+
an array of indices. The returned array **must** have the same shape as ``x``. The returned array **must** have the default array index data type.
28
28
29
29
Notes
30
30
-----
31
31
32
-
- For backward compatibility, conforming implementations *may* support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`).
32
+
- For backward compatibility, conforming implementations **may** support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`).
33
33
"""
34
34
35
35
@@ -42,21 +42,21 @@ def sort(
42
42
Parameters
43
43
----------
44
44
x: array
45
-
input array. *Should* have a real-valued data type.
45
+
input array. **Should** have a real-valued data type.
46
46
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. If set to ``-1``, the function **must** sort along the last axis. Default: ``-1``.
48
48
descending: bool
49
-
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``.
49
+
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``.
50
50
stable: bool
51
-
sort stability. If ``True``, the returned array *must* maintain the relative order of ``x`` values which compare as equal. If ``False``, the returned array *may* maintain the relative order of ``x`` values which compare as equal (i.e., the relative order of ``x`` values which compare as equal is implementation-dependent). Default: ``True``.
51
+
sort stability. If ``True``, the returned array **must** maintain the relative order of ``x`` values which compare as equal. If ``False``, the returned array **may** maintain the relative order of ``x`` values which compare as equal (i.e., the relative order of ``x`` values which compare as equal is implementation-dependent). Default: ``True``.
52
52
53
53
Returns
54
54
-------
55
55
out: array
56
-
a sorted array. The returned array *must* have the same data type and shape as ``x``.
56
+
a sorted array. The returned array **must** have the same data type and shape as ``x``.
57
57
58
58
Notes
59
59
-----
60
60
61
-
- For backward compatibility, conforming implementations *may* support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`).
61
+
- For backward compatibility, conforming implementations **may** support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`).
0 commit comments