-
-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Maybe buggy nullable integer floor division by 0 #30188
Copy link
Copy link
Open
Labels
BugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.NA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Description
From @jschendel in #30183 (comment)
In [6]: a = pd.array([0, 1, -1, None], dtype="Int64")
In [7]: a // 0
Out[7]:
<IntegerArray>
[0, 0, 0, NaN]
Length: 4, dtype: Int64
In [8]: a // -0
Out[8]:
<IntegerArray>
[0, 0, 0, NaN]
Length: 4, dtype: Int64
In [9]: a // 0.0
Out[9]: array([nan, nan, nan, nan])
In [10]: a // -0.0
Out[10]: array([nan, nan, nan, nan])Those should probably all be NA, to match the ndarray behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.NA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations