Skip to main content

top_k_argmax

Function top_k_argmax 

Source
pub fn top_k_argmax(
    scores: &ArrayView1<'_, f32>,
    k: usize,
) -> Result<Vec<(usize, f32)>>
Expand description

Top-k argmax over a 1-D score vector. Returns (index, score) pairs in descending order. Ties broken by ascending index.