pub fn rem_scalar<T>(lhs: &PrimitiveArray<T>, rhs: &T) -> PrimitiveArray<T>
where
    T: NativeType + Rem<Output = T>,
{
    let rhs = *rhs;
    unary(lhs, |a| a % rhs, lhs.data_type().clone())
}
/// Remainder a primitive array of type T by a scalar T.
/// Panics if the divisor is zero.
///
/// # Examples
/// ```
/// use arrow2::compute::arithmetics::basic::rem::rem_scalar;
/// use arrow2::array::Int32Array;
///
/// let a = Int32Array::from(&[None, Some(6), None, Some(7)]);
/// let result = rem_scalar(&a, &2i32);
/// let expected = Int32Array::from(&[None, Some(0), None, Some(1)]);
/// assert_eq!(result, expected)
/// ```
Remainder a primitive array of type T by a scalar T.
Panics if the divisor is zero.
Remainder a primitive array of type T by a scalar T . Panics if the divisor is zero .
pub fn rem_scalar<T>(lhs: &PrimitiveArray<T>, rhs: &T) -> PrimitiveArray<T>
where
    T: NativeType + Rem<Output = T>,
{
    let rhs = *rhs;
    unary(lhs, |a| a % rhs, lhs.data_type().clone())
}
pub fn rem_scalar < T > ( lhs : & PrimitiveArray < T > , rhs : & T ) -> PrimitiveArray < T > where T : NativeType + Rem < Output = T > , { let rhs = * rhs ; unary ( lhs , | a | a % rhs , lhs . data_type ( ) . clone ( ) ) }
Remainder a primitive array of type T by a scalar T.
Panics if the divisor is zero.
Remainder a primitive array of type T by a scalar T . Panics if the divisor is zero .
lhs
&PrimitiveArray<T>
rhs
&T
examples
```
use arrow2::compute::arithmetics::basic::rem::rem_scalar;
use arrow2::array::Int32Array.

let a = Int32Array::from(&[None, Some(6), None, Some(7)]);
let result = rem_scalar(&a, &2i32);
let expected = Int32Array::from(&[None, Some(0), None, Some(1)]);
assert_eq!(result, expected)
```
` ` ` use arrow2 :: compute :: arithmetics :: basic :: rem :: rem_scalar ; use arrow2 :: array :: Int32Array . let a = Int32Array :: from ( & [ None Some ( 6 ) None Some ( 7 ) ] ) ; let result = rem_scalar ( &a &2i32 ) ; let expected = Int32Array :: from ( & [ None Some ( 0 ) None Some ( 1 ) ] ) ; assert_eq! ( result expected ) ` ` `