-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: get_indexer_non_unique with np.datetime64("NaT") and np.timedelta64("NaT") #43870
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
alexhlim
commented
Oct 4, 2021
- closes BUG: get_indexer_non_unique does not handle np.datetime64("NaT") and np.timedelta64("NaT") #43869
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
@jbrockmendel any idea why tests might be failing some machines but not others? right now, they're passing on my local machine. any tips on debugging would be appreciated :) |
first guess is to check if numpy/numpy#12550 is biting you. i.e. when you construct |
You were right -- it was because the older version of numpy was down-casting the NaT. I was able to get the CI passing except for Windows (timed-out) -- is this a consequence of performance? |
windows timeouts are pretty common on the CI; almost certainly unrelated |
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 run asv's which might hit this (conversions) and see if anything is changed
@jbrockmendel @jreback I was able to simplify all the na checks into one (float/complex, Decimal, np.datetime64(“NaT”) and np.timedelta64(“NaT”)) - and looks like performance increased as well!
|
lgtm. @jbrockmendel good here? |
LGTM really nice work here |
fixed up some typos in the comments + adding test cases (failing on master, but this PR should resolve). I'll ping on green @jbrockmendel @jreback |
ping @jreback @jbrockmendel |
thanks @alexhlim really nice! |
your suggestion of using sets + is_matching_na really helped me out!! |
thanks for taking the time to review @jreback @jbrockmendel ! |