-
Notifications
You must be signed in to change notification settings - Fork 21
Fix typing issues #3495
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
Fix typing issues #3495
Conversation
This makes the methods consistent with Mapping
|
This PR now targets #3497 I fixed the remaining issues in the stub. |
| bind_binary<Dataset>(dataset); | ||
| bind_binary<DataArray>(dataset); | ||
| bind_binary<Variable>(dataset); | ||
| bind_binary_scalars(dataset); |
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 showed up because Dataset.__add__ and Dataset.__iadd__ were inconsistent. Only the latter supported floats on the RHS.
There are still inconsistencies in Variable and DataArray because they allow binary ops with Dataset but not in-place ops. This makes sense. But I think the clean solution would be, e.g., to not implement Variable.__add__(Dataset) but instead Dataset.__radd__(Variable). I can do that but I don't know how much of a refactor that would be. So I didn't.
This PR contains some miscellaneous errors but focusses on low level modules.