pub fn find_max<T: Default + std::cmp::PartialOrd + Copy>(array: &Array2<T>) -> Vec<T> {
    let dim = array.shape();
    let mut maxes: Vec<T> = Vec::new();
    for _ in 0..dim[1] {
        maxes.push(Default::default())
    }
    // println!("Each {:?}", maxes);
    for (i,each) in array.iter().enumerate() {
        if *each > maxes[i % dim[1]] {
            maxes[i % dim[1]] = *each;
        }
    }
    maxes
}
/// Finds the maximum values of each column and returns them as a vector of maximum values
Finds the maximum values of each column and returns them as a vector of maximum values
Finds the maximum values of each column and returns them as a vector of maximum values
pub fn find_max<T: Default + std::cmp::PartialOrd + Copy>(array: &Array2<T>) -> Vec<T> {
    let dim = array.shape();
    let mut maxes: Vec<T> = Vec::new();
    for _ in 0..dim[1] {
        maxes.push(Default::default())
    }
    // println!("Each {:?}", maxes);
    for (i,each) in array.iter().enumerate() {
        if *each > maxes[i % dim[1]] {
            maxes[i % dim[1]] = *each;
        }
    }
    maxes
}
pub fn find_max < T : Default + std :: cmp :: PartialOrd + Copy > ( array : & Array2 < T > ) -> Vec < T > { let dim = array . shape ( ) ; let mut maxes : Vec < T > = Vec :: new ( ) ; for _ in 0 .. dim [ 1 ] { maxes . push ( Default :: default ( ) ) } // println!("Each {:?}", maxes); for ( i , each ) in array . iter ( ) . enumerate ( ) { if * each > maxes [ i % dim [ 1 ] ] { maxes [ i % dim [ 1 ] ] = * each ; } } maxes }
Finds the maximum values of each column and returns them as a vector of maximum values
Finds the maximum values of each column and returns them as a vector of maximum values
array
&Array2<T>