pub fn is_infinite<T>(arr: &PrimitiveArray<T>) -> ArrayRef where
    T: NativeType + Float