[][src]Function arrayfire::max

pub fn max<T>(input: &Array<T>, dim: i32) -> Array<T::InType> where
    T: HasAfEnum,
    T::InType: HasAfEnum

Find maximum among elements of given dimension

Parameters

Return Values

Result Array after finding maximum among elements along a given dimension

Examples

use arrayfire::{Dim4, print, randu, max};
let dims = Dim4::new(&[5, 3, 1, 1]);
let a = randu::<f32>(dims);
print(&a);
let b = max(&a, 0);
print(&b);
let c = max(&a, 1);
print(&c);