Skip to main content

argsort

Function argsort 

Source
pub fn argsort<T, D>(
    a: &Array<T, D>,
    axis: Option<usize>,
) -> FerrayResult<Array<u64, IxDyn>>
where T: Element + PartialOrd + Copy, D: Dimension,
Expand description

Return the indices that would sort an array along the given axis.

When axis is None, the array is flattened before computing indices and a 1-D array is returned (matching NumPy behaviour).

Returns u64 indices.

Equivalent to numpy.argsort.