/// Checked multiplication of two primitive arrays. If the result from the
/// multiplications overflows, the validity for that index is changed
/// returned.
///
/// # Examples
/// ```
/// use arrow2::compute::arithmetics::basic::checked_mul;
/// use arrow2::array::Int8Array;
///
/// let a = Int8Array::from(&[Some(100i8), Some(100i8), Some(100i8)]);
/// let b = Int8Array::from(&[Some(1i8), Some(100i8), Some(1i8)]);
/// let result = checked_mul(&a, &b).unwrap();
/// let expected = Int8Array::from(&[Some(100i8), None, Some(100i8)]);
/// assert_eq!(result, expected);
/// ```
Checked multiplication of two primitive arrays. If the result from the
multiplications overflows, the validity for that index is changed
returned.
Checked multiplication of two primitive arrays . If the result from the multiplications overflows the validity for that index is changed returned .
pub fn checked_mul<T>(lhs: &PrimitiveArray<T>, rhs: &PrimitiveArray<T>) -> Result<PrimitiveArray<T>>
where
    T: NativeType + CheckedMul<Output = T> + Zero,
{
    check_same_type(lhs, rhs)?;
    let op = move |a: T, b: T| a.checked_mul(&b);
    binary_checked(lhs, rhs, lhs.data_type().clone(), op)
}
pub fn checked_mul < T > ( lhs : & PrimitiveArray < T > , rhs : & PrimitiveArray < T > ) -> Result < PrimitiveArray < T > > where T : NativeType + CheckedMul < Output = T > + Zero , { check_same_type ( lhs , rhs ) ? ; let op = move | a : T , b : T | a . checked_mul ( & b ) ; binary_checked ( lhs , rhs , lhs . data_type ( ) . clone ( ) , op ) }
Checked multiplication of two primitive arrays.
Checked multiplication of two primitive arrays .
lhs
&PrimitiveArray<T>
rhs
&PrimitiveArray<T>
examples
```
use arrow2::compute::arithmetics::basic::checked_mul;
use arrow2::array::Int8Array.


` ` ` use arrow2 :: compute :: arithmetics :: basic :: checked_mul ; use arrow2 :: array :: Int8Array .