[][src]Function arrayfire::all_true

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

Find if all of the values along a given dimension in the Array are true

Parameters

Return Values

Result Array that contains the result of AND operation of all elements along given dimension

Examples

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