pub fn normalize_val<T>(max: &Vec<T>, array: &mut Array2<T>)
where
T: Copy + Default + std::cmp::PartialOrd + std::ops::Div + std::convert::From<f64>,
f64: std::convert::From<T>,
{
    let width = array.shape()[1];
    for (i,each) in array.iter_mut().enumerate() {
        *each = T::from(f64::from(*each) / f64::from(max[i % width]))
    }
}
/// Divides each value in the array with the given max value
Divides each value in the array with the given max value
Divides each value in the array with the given max value
pub fn normalize_val<T>(max: &Vec<T>, array: &mut Array2<T>)
where
T: Copy + Default + std::cmp::PartialOrd + std::ops::Div + std::convert::From<f64>,
f64: std::convert::From<T>,
{
    let width = array.shape()[1];
    for (i,each) in array.iter_mut().enumerate() {
        *each = T::from(f64::from(*each) / f64::from(max[i % width]))
    }
}
pub fn normalize_val < T > ( max : & Vec < T > , array : & mut Array2 < T > ) where T : Copy + Default + std :: cmp :: PartialOrd + std :: ops :: Div + std :: convert :: From < f64 > , f64 : std :: convert :: From < T > , { let width = array . shape ( ) [ 1 ] ; for ( i , each ) in array . iter_mut ( ) . enumerate ( ) { * each = T :: from ( f64 :: from ( * each ) / f64 :: from ( max [ i % width ] ) ) } }
Divides each value in the array with the given max value
Divides each value in the array with the given max value
max
&Vec<T>
array
&mut Array2<T>