Function arrayfire::any_true [] [src]

pub fn any_true(input: &Array, dim: i32) -> Array

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

Parameters

  • input - Input Array
  • dim - Dimension along which the predicate is evaluated

Return Values

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

Examples

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