@@ -70,10 +70,6 @@ def _wrap_sort_argsort(
7070 raise NotImplementedError (
7171 "kind keyword argument can only be None or 'stable'."
7272 )
73- if stable is None or not stable :
74- raise NotImplementedError (
75- "stable keyword argument is only supported with its default value."
76- )
7773
7874 usm_a = dpnp .get_usm_ndarray (a )
7975 if axis is None :
@@ -101,6 +97,12 @@ def argsort(a, axis=-1, kind=None, order=None, *, stable=True):
10197 kind : {None, "stable"}, optional
10298 Sorting algorithm. Default is ``None``, which is equivalent to
10399 ``"stable"``. Unlike NumPy, no other option is accepted here.
100+ stable : {None, bool}, optional
101+ Sort stability. If ``True``, the returned array will maintain
102+ the relative order of ``a`` values which compare as equal.
103+ The same behavior applies when set to ``False`` or ``None``.
104+ Internally, this option selects ``kind="stable"``.
105+ Default: ``None``.
104106
105107 Returns
106108 -------
@@ -118,9 +120,10 @@ def argsort(a, axis=-1, kind=None, order=None, *, stable=True):
118120
119121 Limitations
120122 -----------
121- Parameters `order` and `stable` are only supported with their default
122- values. Parameter `kind` can only be ``None`` or ``"stable"`` which are
123- equivalent. Otherwise ``NotImplementedError`` exception will be raised.
123+ Parameters `order` is only supported with its default value.
124+ Parameter `kind` can only be ``None`` or ``"stable"`` which are equivalent.
125+ Otherwise ``NotImplementedError`` exception will be raised.
126+
124127 See Also
125128 --------
126129 :obj:`dpnp.ndarray.argsort` : Equivalent method.
@@ -216,6 +219,12 @@ def sort(a, axis=-1, kind=None, order=None, *, stable=True):
216219 kind : {None, "stable"}, optional
217220 Sorting algorithm. Default is ``None``, which is equivalent to
218221 ``"stable"``. Unlike NumPy, no other option is accepted here.
222+ stable : {None, bool}, optional
223+ Sort stability. If ``True``, the returned array will maintain
224+ the relative order of ``a`` values which compare as equal.
225+ The same behavior applies when set to ``False`` or ``None``.
226+ Internally, this option selects ``kind="stable"``.
227+ Default: ``None``.
219228
220229 Returns
221230 -------
@@ -229,9 +238,9 @@ def sort(a, axis=-1, kind=None, order=None, *, stable=True):
229238
230239 Limitations
231240 -----------
232- Parameters `order` and `stable` are only supported with their default
233- values. Parameter `kind` can only be ``None`` or ``"stable"`` which are
234- equivalent. Otherwise ``NotImplementedError`` exception will be raised.
241+ Parameters `order` is only supported with its default value.
242+ Parameter `kind` can only be ``None`` or ``"stable"`` which are equivalent.
243+ Otherwise ``NotImplementedError`` exception will be raised.
235244
236245 See Also
237246 --------
0 commit comments