Should internal usages of sorting with numpy use kind="stable"
?
#53558
Labels
Compat
pandas objects compatability with Numpy or Python functions
Needs Discussion
Requires discussion from core team before further action
There are several places where we call
np.sort/argsort/etc.
internally, i.e. not cases where users can specify a sortingkind
like insort_values
, and use the default unstablekind="quicksort"
In numpy 1.25, it appears that CPUs that can use AVX will have a modified quicksort and recently broke some tests xref #53548 in our numpy dev build where we were testing these unstable sorting results.
Is it worth transitioning to a stable sorting algorithm internally for consistency?
Alternatively we could dynamically transition to use a stable sorting algorithm if duplicate values are being sorted?
The text was updated successfully, but these errors were encountered: