Skip to main content

top_k

Function top_k 

Source
pub fn top_k<T: Element>(
    x: &[T],
    shape: &[usize],
    k: usize,
    axis: usize,
) -> (Vec<T>, Vec<i32>)
Expand description

top_k along axis: the k largest elements of each line in descending order (ties in their original order), and their indices.