BUG: Nullable int floordiv 0 result changed from 0 to inf · Issue #48223 · pandas-dev/pandas (original) (raw)
>>> import pandas as pd
>>> pd.__version__
'1.4.3'
>>> 1 // pd.Series([0], dtype='Int64')
0 0
dtype: Int64
vs
In [1]: pd.__version__
Out[1]: '1.6.0.dev0' # essentially 1.5
In [2]: 1 // pd.Series([0], dtype='Int64')
Out[2]:
0 inf
dtype: Float64
Ran a bisect and found this was the commit that caused the change
57d7768c205d30cc50ba9b42d60d24d1e32eb249 is the first bad commit
commit 57d7768c205d30cc50ba9b42d60d24d1e32eb249
Author: jbrockmendel <jbrockmendel@gmail.com>
Date: Thu Jan 27 16:33:24 2022 -0800
BUG: NumericArray * td64_array (#45622)
While personally I think inf
is a more sensible result than 0
, appears this was still being actively discussed in #30188