-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
BugNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Milestone
Description
Series looks to be coerced to float if the result contains NaN or inf. Otherwise Index doesn't. Make it to be consistent in either way.
Code Sample, a copy-pastable example if possible
pd.Series([1]) // pd.Series([0])
#0 inf
# dtype: float64
pd.Index([1]) // pd.Index([0])
# Int64Index([0], dtype='int64')
np.array([1]) // np.array([0])
# array([0])
pd.Series([1]) % pd.Series([0])
#0 NaN
# dtype: float64
pd.Index([1]) % pd.Index([0])
# Int64Index([0], dtype='int64')
np.array([1]) % np.array([0])
# array([0])
output of pd.show_versions()
on current master.
Metadata
Metadata
Assignees
Labels
BugNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations