Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: div by integer 0 returning non-signed infs (and nan issue) #6178

Closed
jreback opened this issue Jan 29, 2014 · 2 comments · Fixed by #6359
Closed

BUG: div by integer 0 returning non-signed infs (and nan issue) #6178

jreback opened this issue Jan 29, 2014 · 2 comments · Fixed by #6359
Labels
Bug Numeric Operations Arithmetic, Comparison, and Logical operations
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jan 29, 2014

#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
@jreback
Copy link
Contributor Author

jreback commented Jan 29, 2014

cc @jtratner this is an issue on com._fill_zeros it needs to figure out the sign of the resultant expression (easy), but the rops seems to fail for some reason

@jreback
Copy link
Contributor Author

jreback commented Jan 29, 2014

this fixes for series; problem on frame/panel (but only on rops)

https://github.com/jreback/pandas/tree/int_div

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants