-
Notifications
You must be signed in to change notification settings - Fork 27.7k
Stable torch.sort and torch.argsort #38681
Copy link
Copy link
Closed
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Metadata
Metadata
Assignees
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
🚀 Feature
Add stable version of
torch.sortandtorch.argsort. Stable sort algorithms sort repeated elements in the same order that they appear in the input.Motivation
In some applications we need to preserve the order of equal elements while sorting.
Alternatives
Now we can do:
and
But I think that it will be cool to have this functionality in
torch.sortandtorch.argsort.