pub fn max_index_and_value(vec : ArrayView1<f32>) -> (usize, f32) {
    let mut max_index = 0; 
    let mut max_value = vec[[0,]];
    for i in 1..vec.shape()[0] {
        if vec[[i,]] > max_value {
            max_value = vec[[i,]];
            max_index = i;
        }
    }
    (max_index, max_value)
}
///Given a vector of floats, yields the index and the value of the largest
///float in `vec`.
Given a vector of floats, yields the index and the value of the largest
float in `vec`.
Given a vector of floats yields the index and the value of the largest float in ` vec ` .
pub fn max_index_and_value(vec : ArrayView1<f32>) -> (usize, f32) {
    let mut max_index = 0; 
    let mut max_value = vec[[0,]];
    for i in 1..vec.shape()[0] {
        if vec[[i,]] > max_value {
            max_value = vec[[i,]];
            max_index = i;
        }
    }
    (max_index, max_value)
}
pub fn max_index_and_value ( vec : ArrayView1 < f32 > ) -> ( usize , f32 ) { let mut max_index = 0 ; let mut max_value = vec [ [ 0 , ] ] ; for i in 1 .. vec . shape ( ) [ 0 ] { if vec [ [ i , ] ] > max_value { max_value = vec [ [ i , ] ] ; max_index = i ; } } ( max_index , max_value ) }
Given a vector of floats, yields the index and the value of the largest
float in `vec`.
Given a vector of floats yields the index and the value of the largest float in ` vec ` .
vec
ArrayView1<f32>
vec
ArrayView1<f32>