-
-
Notifications
You must be signed in to change notification settings - Fork 147
feat(index): ➖ arithmetic subtraction #1360
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
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.
Looks pretty good
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.
The only thing I'm worried about here is that we don't necessarily have a complete set of tests for subtracting timestamps, timedeltas, series, indexes, lists of such from DatetimeIndex
and TimedeltaIndex
, or from a plain Index
where we detect an error. There are some that exist and are scattered around the tests.
Maybe we do a separate PR for that? Or handle here?
I understand that a set of systematic tests is desirable whenever the corresponding code is modified. In this case, however, I would personally prefer to develop these tests in a separate pull request or issue. It has been quite exhausting to work out the timestamp and timedelta subtractions; the challenge may trace back to the fact that the subtraction here is not closed in the algebraic sense. If needed, I can also revert the changes in |
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.
thanks @cmp0xff
That's fine. |
It belongs to the series of changes suggested by #1347, although not in the sense of a Pandas Series.
assert_type()
to assert the type of any return value