Function polars_arrow::compute::boolean::not
source · pub fn not(array: &BooleanArray) -> BooleanArray
Available on crate feature
compute_boolean
only.Expand description
Performs unary NOT
operation on an arrays. If value is null then the result is also
null.
§Example
use polars_arrow::array::BooleanArray;
use polars_arrow::compute::boolean::not;
let a = BooleanArray::from(vec![Some(false), Some(true), None]);
let not_a = not(&a);
assert_eq!(not_a, BooleanArray::from(vec![Some(true), Some(false), None]));