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

Multiplies two primitive arrays with the same type. Panics if the multiplication of one pair of values overflows.

Examples

use arrow2::compute::arithmetics::basic::mul;
use arrow2::array::Int32Array;

let a = Int32Array::from(&[None, Some(6), None, Some(6)]);
let b = Int32Array::from(&[Some(5), None, None, Some(6)]);
let result = mul(&a, &b);
let expected = Int32Array::from(&[None, None, None, Some(36)]);
assert_eq!(result, expected)