Document sort stability and NaN handling (#3400)

This commit is contained in:
NeuralNoble
2026-04-16 03:02:42 +05:30
committed by GitHub
parent 50ae31241a
commit fd8e849e26
2 changed files with 22 additions and 4 deletions
+6
View File
@@ -2821,6 +2821,9 @@ void init_ops(nb::module_& m) {
R"pbdoc(
Returns a sorted copy of the array.
The sort is stable, meaning equal elements preserve their relative
order. ``NaN`` values are placed at the end.
Args:
a (array): Input array.
axis (int or None, optional): Optional axis to sort over.
@@ -2848,6 +2851,9 @@ void init_ops(nb::module_& m) {
R"pbdoc(
Returns the indices that sort the array.
The sort is stable, meaning equal elements preserve their relative
order. ``NaN`` values are placed at the end.
Args:
a (array): Input array.
axis (int or None, optional): Optional axis to sort over.