-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Tick division is incorrect #57508
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
Conversation
# self._value < other, we would get 0 as a result, | ||
# which is not correct. | ||
# We need to try going to a higher resolution to fix this | ||
curr_value = self._value |
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.
I'm not the happiest with this code, since there's a possibility we might overflow (if other is very big), and there could be the possibility that a Tick is not representable in nanoseconds.
Is this a real possibility?
(not too familiar with tick code, so I can't tell mysel)
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.
this introduces (untested) changes in Timedelta division in addition to Tick. I'm skeptical that this is the right place for a change, but if it is, it should be tested.
did you look at Tick._next_higher_resolution? it is what we use in |
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Looks like this PR has gone stale and needs a rebase. Closing to clear the queue but feel free to reopen when you have time to circle back |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.