pub fn divide<T>(left: &PrimitiveArray<T>, right: &PrimitiveArray<T>) -> Result<PrimitiveArray<T>>
where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native>
        + Sub<Output = T::Native>
        + Mul<Output = T::Native>
        + Div<Output = T::Native>
        + Zero
        + One,
{
    #[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), feature = "simd"))]
    return simd_divide(&left, &right);

    #[allow(unreachable_code)]
    math_op(left, right, |a, b| {
        if b.is_zero() {
            Err(ArrowError::DivideByZero)
        } else {
            Ok(a / b)
        }
    })
}
/// Perform `left / right` operation on two arrays. If either left or right value is null
/// then the result is also null. If any right hand value is zero then the result of this
/// operation will be `Err(ArrowError::DivideByZero)`.
Perform `left / right` operation on two arrays. If either left or right value is null
then the result is also null. If any right hand value is zero then the result of this
operation will be `Err(ArrowError::DivideByZero)`.
Perform ` left / right ` operation on two arrays . If either left or right value is null then the result is also null . If any right hand value is zero then the result of this operation will be ` Err ( ArrowError :: DivideByZero ) ` .
pub fn divide<T>(left: &PrimitiveArray<T>, right: &PrimitiveArray<T>) -> Result<PrimitiveArray<T>>
where
    T: PolarsNumericType,
    T::Native: Add<Output = T::Native>
        + Sub<Output = T::Native>
        + Mul<Output = T::Native>
        + Div<Output = T::Native>
        + Zero
        + One,
{
    #[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), feature = "simd"))]
    return simd_divide(&left, &right);
    #[allow(unreachable_code)]
    math_op(left, right, |a, b| {
        if b.is_zero() {
            Err(ArrowError::DivideByZero)
        } else {
            Ok(a / b)
        }
    })
}
pub fn divide < T > ( left : & PrimitiveArray < T > , right : & PrimitiveArray < T > ) -> Result < PrimitiveArray < T > > where T : PolarsNumericType , T :: Native : Add < Output = T :: Native > + Sub < Output = T :: Native > + Mul < Output = T :: Native > + Div < Output = T :: Native > + Zero + One , { # [ cfg ( all ( any ( target_arch " " target_arch " " ) feature " " ) ) ] return simd_divide ( & left , & right ) ; # [ allow ( unreachable_code ) ] math_op ( left , right , | a , b | { if b . is_zero ( ) { Err ( ArrowError :: DivideByZero ) } else { Ok ( a / b ) } } ) }
Perform `left / right` operation on two arrays.
Perform ` left / right ` operation on two arrays .
left
&PrimitiveArray<T>
right
&PrimitiveArray<T>
left
&PrimitiveArray<T>
right
&PrimitiveArray<T>