MatX icon indicating copy to clipboard operation
MatX copied to clipboard

[FEA] Add argsort function

Open HugoPhibbs opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Wanting to sort a tensor by it's indices. This is a rather vital feature for my project

Describe the solution you'd like A function to sort a tensor along rows (or a given dimension) interms of indices. Should work identical to numpys argsort

Would look like:

(sorted_indices = matx::argsort(tensor_in, SORT_DIR_ASC)).run();

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

I've looked in docs and couldn't find anything

Additional context Add any other context or screenshots about the feature request here.

None

HugoPhibbs avatar Aug 08 '24 05:08 HugoPhibbs