-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: maybe_promote #51592
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
PERF: maybe_promote #51592
Conversation
cb0fcae
to
5379298
Compare
@@ -556,6 +557,13 @@ def ensure_dtype_can_hold_na(dtype: DtypeObj) -> DtypeObj: | |||
return dtype | |||
|
|||
|
|||
_canonical_nans = { | |||
np.datetime64: np.datetime64("NaT", "ns"), |
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.
Will it always be correct to assume "ns"
?
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.
in most contexts it wont matter, but we could probably cook up an example (maybe with object dtype) where it did
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.
updated so as to retain identical fill_value in object-result cases
our asv site appears to be done, but locally a lot of the regressions im seeing since 1.5.0 are for cc @phofl |
thx @jbrockmendel |
Backport PR #51592: PERF: maybe_promote Co-authored-by: jbrockmendel <[email protected]>
Test runtime for pandas/tests/indexing/multiindex/test_indexing_slow.py decreases from 30s to 14.5s.
See discussion around #39692 (comment)