Skip to content

Commit 263b666

Browse files
committed
Set stable to True for sorting functions by default
As mandated by the array API spec
1 parent 60c6ad6 commit 263b666

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dpctl/tensor/_sorting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
__all__ = ["sort", "argsort"]
3131

3232

33-
def sort(x, /, *, axis=-1, descending=False, stable=False):
34-
"""sort(x, axis=-1, descending=False, stable=False)
33+
def sort(x, /, *, axis=-1, descending=False, stable=True):
34+
"""sort(x, axis=-1, descending=False, stable=True)
3535
3636
Returns a sorted copy of an input array `x`.
3737
@@ -106,8 +106,8 @@ def sort(x, /, *, axis=-1, descending=False, stable=False):
106106
return res
107107

108108

109-
def argsort(x, axis=-1, descending=False, stable=False):
110-
"""argsort(x, axis=-1, descending=False, stable=False)
109+
def argsort(x, axis=-1, descending=False, stable=True):
110+
"""argsort(x, axis=-1, descending=False, stable=True)
111111
112112
Returns the indices that sort an array `x` along a specified axis.
113113

0 commit comments

Comments
 (0)