Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork18.5k
PERF: Restore old performances with .isin() on columns typed as np.ui…#61320
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pre-commit.ci autofix |
Implicit conversion to float64 happens only whith uint64/int64.
The second test must be False and was handled by the PR#46693
The result is correct because in this case there is no implicit conversion so it's not necessary to use object. Before:
After:
|
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.
lgtm
eca6bd3
intopandas-dev:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@pbrochart |
Uh oh!
There was an error while loading.Please reload this page.
…nt64
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Only if dtypes are equal (e.g uint64 vs uint64, uint32 vs uint32...)
%timeit data["uints"].isin([np.uint64(1), np.uint64(2)]) # 17ms (!)
The last line, with older numpy==1.26.4 (last version <2.0), is even worse: ~200ms.