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 arrow2::array::BooleanArray;
use arrow2::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]));