-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Fix bug where nanops._has_infs
doesn't work with many dtypes (issue #7357)
#7448
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
Travis CI passes, but this does NOT include the fix for the bug mentioned in #7440 |
ok, need to fix #7440 first |
This version should fix the bug identified in #7440. |
@@ -538,12 +542,9 @@ def _maybe_arg_null_out(result, axis, mask, skipna): | |||
|
|||
|
|||
def _get_counts(mask, axis): | |||
if axis is not None: |
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.
The fix for the issue in #7440 is here
closer
|
That is a separate problem resulting from the same underlying issue with scalars being converted to python native objects. I am making a fix for these new issues now, but I don't think there is any way for me to fix it generally. Can you do me a favor and tell me what happens when you do these: a=np.zeros(11).astype('bool')
b=a.shape[0]
type(b) a=np.zeros(11).astype('bool')
b=a.sum(0)
type(b) a=np.zeros(11).astype('bool')
b=a.shape[0] - a.sum(0, dtype=a.dtype)
type(b) Whatever the case, this seems to be an upstream numpy issue. I can work around it easily enough here, and I can't find any more code in |
This version should also fix the new issue. |
windows is an odd beast - numpy does some odd things like type conversions (because the windows default int is int32 EVEN ON 64-bit), really weird. not a numpy bug but just some idiosyncratic behavior. here's the results..
|
ok fixed those other 2....last one is here
|
|
Similar thing again. Try this version. |
Wait, no, give me a second. |
Alright, now try. |
same result |
… arrays ( issue #7357 )
Try this version please |
looks good! ok...ping when passes travis and we'll get this in thanks! |
Travis tests pass |
Fix bug where ``nanops._has_infs`` doesn't work with many dtypes (issue #7357)
ok.gr8! |
Also fixes #7415 |
Fixes issue #7357, where where
nanops._has_infs
doesn't work with many dtypes