Open
Description
Julia currently supports 1D sortperm, and PR #45211 adds sortperm support for multidmensional arrays, returning CartesianIndex.
PyTorch and NumPy both provide multidimensional argsort functions that return sort indexes along only one dimension. While this is less general, it requires less storage in the return value for high dimensional arrays. Furthermore, there are CUDA kernels available for argsort but not for returning CartesianIndex. A similar comment applies to findmax vs NumPy argmax.
I would find it very useful if Julia could support argsort/argmax-style interfaces in addition to sortperm/findmax-style interfaces.
Metadata
Metadata
Assignees
Labels
No labels