/// Multiply a scalar T to a primitive array of type T.
/// Panics if the multiplication of the values overflows.
///
/// # Examples
/// ```
/// use arrow2::compute::arithmetics::basic::mul_scalar;
/// use arrow2::array::Int32Array;
///
/// let a = Int32Array::from(&[None, Some(6), None, Some(6)]);
/// let result = mul_scalar(&a, &2i32);
/// let expected = Int32Array::from(&[None, Some(12), None, Some(12)]);
/// assert_eq!(result, expected)
/// ```
Multiply a scalar T to a primitive array of type T.
Panics if the multiplication of the values overflows.
Multiply a scalar T to a primitive array of type T . Panics if the multiplication of the values overflows .
pub fn mul_scalar<T>(lhs: &PrimitiveArray<T>, rhs: &T) -> PrimitiveArray<T>
where
    T: NativeType + Mul<Output = T>,
{
    let rhs = *rhs;
    unary(lhs, |a| a * rhs, lhs.data_type().clone())
}
pub fn mul_scalar < T > ( lhs : & PrimitiveArray < T > , rhs : & T ) -> PrimitiveArray < T > where T : NativeType + Mul < Output = T > , { let rhs = * rhs ; unary ( lhs , | a | a * rhs , lhs . data_type ( ) . clone ( ) ) }
Multiply a scalar T to a primitive array of type T.
Panics if the multiplication of the values overflows.
Multiply a scalar T to a primitive array of type T . Panics if the multiplication of the values overflows .
lhs
&PrimitiveArray<T>
rhs
&T
examples
```
use arrow2::compute::arithmetics::basic::mul_scalar;
use arrow2::array::Int32Array.


` ` ` use arrow2 :: compute :: arithmetics :: basic :: mul_scalar ; use arrow2 :: array :: Int32Array .