-
-
Notifications
You must be signed in to change notification settings - Fork 19k
Closed
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorBugNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Description
ser = pd.Series([True, False])
ser // ser # <- raises
divmod(ser, ser) # <- does not raise
In a number of places, specifically the extension tests TestArithmeticOps._check_divmod_op, we check for internal consistency with something like
res = divmod(obj, other)[0]
expected = obj // other
tm.assert_equal(res, expected)
In trying to adapt BooleanArray behavior to match non-masked bool dtype Series behavior (xref #41165) I found that Series[bool]
raises on floordiv but allows divmod.
Either both should raise or neither.
Metadata
Metadata
Assignees
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorBugNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations