-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
remove unused time conversion funcs #17711
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3436,7 +3436,18 @@ def cast_to_nanoseconds(ndarray arr): | |
return result | ||
|
||
|
||
def pydt_to_i8(object pydt): | ||
cdef inline _to_i8(object val): | ||
cdef pandas_datetimestruct dts | ||
try: | ||
return val.value | ||
except AttributeError: | ||
if is_datetime64_object(val): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did u fix for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #17711 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so just change this to (to remove all of this code)
of maybe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implemented this and it doesn't appear to have broken anything. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great, ok merging this. would still like to remove this routing (in favor of pydt_to_i8 but can do that in another PR. |
||
return get_datetime64_value(val) | ||
elif PyDateTime_Check(val): | ||
return Timestamp(val).value | ||
return val | ||
|
||
cpdef pydt_to_i8(object pydt): | ||
""" | ||
Convert to int64 representation compatible with numpy datetime64; converts | ||
to UTC | ||
|
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.
you need a return type (int64_t)
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.
There are cases in which it returns the
object
input.