-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
REF: avoid sanitize_to_nanoseconds #49009
REF: avoid sanitize_to_nanoseconds #49009
Conversation
# Timestamps like | ||
# TODO 2022-10-08 we only have one test that gets here and | ||
# values are already in nanoseconds in that case. | ||
self.grouping_vector = Series(self.grouping_vector).to_numpy() |
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.
So Series(...).to_numpy()
will coerce to nanos and then output to numpy? Is this a lot slower than sanitize_to_nanoseconds
?
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.
So Series(...).to_numpy() will coerce to nanos and then output to numpy?
Yes.
Is this a lot slower than sanitize_to_nanoseconds?
A bit. Adds about 65 microseconds.
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.
Okay. I guess that's a fair tradeoff for being able to clean up sanitize_to_nanoseconds in #48670
Thanks @jbrockmendel |
* REF: avoid sanitize_to_nanoseconds * fix test
Most of the usages are unnecessary bc we go through the DTA/TDA constructors. After this there is only one left, and that will be removed by #48670