BUG: div by integer 0 returning non-signed infs (and nan issue) · Issue #6178 · pandas-dev/pandas (original) (raw)

@jreback

#6149

exposed this bug; going to update the tests (and i'll link there that show it)
initially only showed up on py2.6...but it is real

the signs of the inf under integer division are wrong.
for the most part the np.nan are preserved, not sure if this is right or not

In [1]: Series([np.nan,1,-1])/0
Out[1]: 
0    inf
1    inf
2    inf
dtype: float64

In [2]: Series([np.nan,1,-1])/0.
Out[2]: 
0    NaN
1    inf
2   -inf
dtype: float64