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

Wrapping multiplication of two PrimitiveArrays. It wraps around at the boundary of the type if the result overflows.

Examples

use arrow2::compute::arithmetics::basic::wrapping_mul;
use arrow2::array::PrimitiveArray;

let a = PrimitiveArray::from([Some(100i8), Some(0x10i8), Some(100i8)]);
let b = PrimitiveArray::from([Some(0i8), Some(0x10i8), Some(0i8)]);
let result = wrapping_mul(&a, &b);
let expected = PrimitiveArray::from([Some(0), Some(0), Some(0)]);
assert_eq!(result, expected);