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
It would be much easier to implement a two-pass O(n) stable reversal of the indexing array as a postprocessing step. I'm not sure we can do what you suggest without significantly affecting performance: sorting moved away from using the dtype's compare function, to having specialized inlined functions with hardcoded < for native types. And I don't think we can pass a "pointer to an inline function" and get the same performance we have now...
So I guess I'm leaning towards a reverse kwarg solution. Before getting something like this going it would be a good idea to talk about it on the mailing list. Could you send an e-mail to get the discussion started?
Looks like there is no easy way to achieve a stable reversed indirect sort with the sorting functions in numpy:
argsort()[::-1] would give a reversed indirect sort.
argsort(kind='mergesort')[::-1] does not give a stable reversed indirect sort. ([::-1] makes it unstable.
Would you consider including a 'reversed' parameter to argsort?
The text was updated successfully, but these errors were encountered: