Skip to content

Commit feefc31

Browse files
authored
docs: document stable sortby ordering (#11491)
* docs: document stable sortby ordering * docs: document stable sortby ordering
1 parent 895d01f commit feefc31

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

xarray/core/dataarray.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5234,6 +5234,8 @@ def sortby(
52345234
https://numpy.org/doc/stable/reference/generated/numpy.lexsort.html
52355235
and the FIRST key in the sequence is used as the primary sort key,
52365236
followed by the 2nd key, etc.
5237+
Sorting is stable: when all sort keys compare equal, the original order is
5238+
preserved.
52375239
52385240
Parameters
52395241
----------

xarray/core/dataset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8124,6 +8124,8 @@ def sortby(
81248124
https://numpy.org/doc/stable/reference/generated/numpy.lexsort.html
81258125
and the FIRST key in the sequence is used as the primary sort key,
81268126
followed by the 2nd key, etc.
8127+
Sorting is stable: when all sort keys compare equal, the original order is
8128+
preserved.
81278129
81288130
Parameters
81298131
----------

0 commit comments

Comments
 (0)