Function polars_arrow::compute::boolean::all
source · pub fn all(array: &BooleanArray) -> bool
Available on crate feature
compute_boolean
only.Expand description
Returns whether all values in the array are true
.
Null values are ignored.
§Example
use polars_arrow::array::BooleanArray;
use polars_arrow::compute::boolean::all;
let a = BooleanArray::from(&[Some(true), Some(true)]);
let b = BooleanArray::from(&[Some(false), Some(true)]);
let c = BooleanArray::from(&[None, Some(true)]);
assert_eq!(all(&a), true);
assert_eq!(all(&b), false);
assert_eq!(all(&c), true);