-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: maybe_convert_objects corner cases #41714
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
ENH: maybe_convert_objects corner cases #41714
Conversation
jbrockmendel
commented
May 29, 2021
- closes #xxxx
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
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.
does this have any user facing change?
@@ -2550,6 +2576,26 @@ def maybe_convert_objects(ndarray[object] objects, | |||
return objects | |||
|
|||
|
|||
cdef _infer_all_nats(dtype, ndarray datetimes, ndarray timedeltas): | |||
""" |
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 type dtype & narrow the types on datetimes/timedeltas if possible.
also a return type ?
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.
not really, as there is no good way to declare ndarray[dt64]
, and both the dtype arg and return type aren't representable here
not that im aware of. motivating goal is to eventually kill off maybe_infer_to_datetimelike (along with the PR deprecating the string inference) and just use |
can you rebase. maybe_convert_objects is getting pretty long...... |
on the plus side its mostly flat (at least the recent additions are). im optimistic we can get rid of some other conversion functions/special-casing and it'll be extremely worth it (xref #40489 could use your input) |