In rust, how do you efficiently sort an ndarray::Array2 by a particular column?
I am trying to sort an Array2 by a particular column of values, either ascending or descending.
In rust, how do you efficiently sort an ndarray::Array2 by a particular column?
I am trying to sort an Array2 by a particular column of values, either ascending or descending.
Copyright © 2021 Jogjafile Inc.
Here is a simple solution using
Vec::sort:Here is the link to RustExplorer.
If you want to get rid of the extra
Vec, I think you would have to implement the sort algorithm (like Mergesort yourself).