-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add missing support for addition and subtraction #37222
Conversation
Inspired by the discussion in JuliaLang#28570
You need |
Co-authored-by: Milan Bouchet-Valat <[email protected]>
Those are covered in |
Yes, no need to add them. |
These test the exported subtypes of `AbstractTime`
Avoids the usage of `subtypes` function, which would need to be imported from `InteractiveUtils` otherwise
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, looks good to me.
As discussed at #28570, I think this is justified as all types that support +
and -
should propagate missing
. This is different from adding new missing
-propagating functions, which I agree is problematic as it's not clear where to stop. Here the limit is very clear: add methods to all functions that already propagate missing values to ensure consistency.
Fun fact: this missing method was also spotted by pandas developers, who have recently worked on improving their missing values handling and took Julia as a reference.
Co-authored-by: Milan Bouchet-Valat <[email protected]>
Thanks for your help! |
Inspired by the discussion in #28570.
Tests pass locally with this change.
There are no additional tests for
missing
support in this PR, it seems to me the methods are so simple that I'm not sure what would be tested here (although I have a feeling saying things like this is why I'm not a software developer...)