pub fn checked_rem_scalar<T>(
    lhs: &PrimitiveArray<T>,
    rhs: &T
) -> PrimitiveArray<T> where
    T: NativeArithmetics + CheckedRem<Output = T>, 
Available on crate feature compute_arithmetics only.
Expand description

Checked remainder of a primitive array of type T by a scalar T. If the divisor is zero then the validity array is changed to None.

Examples

use arrow2::compute::arithmetics::basic::checked_rem_scalar;
use arrow2::array::Int8Array;

let a = Int8Array::from(&[Some(-100i8)]);
let result = checked_rem_scalar(&a, &100i8);
let expected = Int8Array::from(&[Some(0i8)]);
assert_eq!(result, expected);