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
By specifying sort order for floating-point values, this has implications for unique (see gh-249), as sorting NaN values to the ends affords relatively straightforward workarounds for handling multiple returned NaNs as discussed in the referenced issue.
Currently, the specification does not indicate the behavior for sorting the IEEE 754 floating-point values:
NaN
,-0
, and+0
.In NumPy,
NaN
values are sorted to the end and signed zeros are not sorted:When sorting lists in Python,
NaN
values are left in place and signed zeros are not sorted:Other languages have made different design decisions. E.g., Julia sorts signed zeros and places
NaN
values at the end.IMO, we should clarify the sort order for ascending and descending sort. Preferably,
NaN
values to the end when sorting in ascending order and to the beginning when sorting in descending orderThe text was updated successfully, but these errors were encountered: