argmax

Function argmax 

Source
pub fn argmax(arr: &mut Array) -> Result<Dynamic, Box<EvalAltResult>>
Expand description

Return the index of the largest array element. Fails if the input is not an array, or if it is an array with elements other than INT or FLOAT.

let data = [1, 2, 3];
let m = argmax(data);
assert_eq(m, 2);