pub fn checked_div_scalar<T>(lhs: &PrimitiveArray<T>, rhs: &T) -> PrimitiveArray<T>
where
    T: NativeArithmetics + CheckedDiv<Output = T>,
{
    let rhs = *rhs;
    let op = move |a: T| a.checked_div(&rhs);

    unary_checked(lhs, op, lhs.data_type().clone())
}
/// Checked division of a primitive array of type T by a scalar T. If the
/// divisor is zero then the validity array is changed to None.
///
/// # Examples
/// ```
/// use arrow2::compute::arithmetics::basic::checked_div_scalar;
/// use arrow2::array::Int8Array;
///
/// let a = Int8Array::from(&[Some(-100i8)]);
/// let result = checked_div_scalar(&a, &100i8);
/// let expected = Int8Array::from(&[Some(-1i8)]);
/// assert_eq!(result, expected);
/// ```
Checked division of a primitive array of type T by a scalar T. If the
divisor is zero then the validity array is changed to None.
Checked division of a primitive array of type T by a scalar T . If the divisor is zero then the validity array is changed to None .
pub fn checked_div_scalar<T>(lhs: &PrimitiveArray<T>, rhs: &T) -> PrimitiveArray<T>
where
    T: NativeArithmetics + CheckedDiv<Output = T>,
{
    let rhs = *rhs;
    let op = move |a: T| a.checked_div(&rhs);
    unary_checked(lhs, op, lhs.data_type().clone())
}
pub fn checked_div_scalar < T > ( lhs : & PrimitiveArray < T > , rhs : & T ) -> PrimitiveArray < T > where T : NativeArithmetics + CheckedDiv < Output = T > , { let rhs = * rhs ; let op = move | a : T | a . checked_div ( & rhs ) ; unary_checked ( lhs , op , lhs . data_type ( ) . clone ( ) ) }
Checked division of a primitive array of type T by a scalar T. If the
divisor is zero then the validity array is changed to None.
Checked division of a primitive array of type T by a scalar T . If the divisor is zero then the validity array is changed to None .
lhs
&PrimitiveArray<T>
rhs
&T
lhs
&PrimitiveArray<T>
rhs
&T
examples
```
use arrow2::compute::arithmetics::basic::checked_div_scalar;
use arrow2::array::Int8Array.


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