Function polars::export::arrow::compute::arithmetics::basic::wrapping_mul_scalar
source · [−]pub fn wrapping_mul_scalar<T>(
lhs: &PrimitiveArray<T>,
rhs: &T
) -> PrimitiveArray<T> where
T: NativeArithmetics + WrappingMul<Output = T>,
This is supported on crate feature
compute_arithmetics
only.Expand description
Wrapping multiplication of a scalar T to a PrimitiveArray
of type T.
It do nothing if the result overflows.
Examples
use arrow2::compute::arithmetics::basic::wrapping_mul_scalar;
use arrow2::array::Int8Array;
let a = Int8Array::from(&[None, Some(0x10)]);
let result = wrapping_mul_scalar(&a, &0x10);
let expected = Int8Array::from(&[None, Some(0)]);
assert_eq!(result, expected);