-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fixed _format_labels in tile.py for np.inf. #4954
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
Conversation
can you squash to 1 commit? looks good |
if you want to put you test example in v0.13.0 you can (to sort of 'announce' this fix)..up2u |
I did that, I hope adding the example to the documentation is okay. One question: It's rather unmathematical to write |
@@ -114,6 +114,15 @@ def test_na_handling(self): | |||
ex_result = np.where(com.isnull(arr), np.nan, result) | |||
tm.assert_almost_equal(result, ex_result) | |||
|
|||
def test_inf_handling(self): | |||
data = np.arange(6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also test with Series
? thx
@filmor Can u rebase? |
Since the fractional part of np.inf is 0.0 it is enough to change the formatter string in this case to the (nearly) equivalent "%.0f".
Done. The question still stands though, but it can be handled in a different PR. |
I think it's more consistent to use the existing labeling scheme (even if technically mathematically incorrect) |
That's fine with me :) |
BUG: Fixed _format_labels in tile.py for np.inf.
@filmor thanks! |
Fixes issue #3415.