-
Notifications
You must be signed in to change notification settings - Fork 21
Request for comments: ADR on not supporting attributes #3145
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
jl-wynen
left a comment
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.
Just some typos. Looks good otherwise.
Co-authored-by: Jan-Lukas Wynen <jan-lukas.wynen@ess.eu>
|
|
||
| If we consider binary operations (such as addition or division) then it is not clear how attributes should be handled if they mismatch between operands or are missing in one operand. | ||
| This is an example where Scipp made a different choice than Xarray. | ||
| In Xarray, ``((a + b) + c).attrs != (a + (b + c)).attrs`` whereas in Scipp ``((a + b) + c).attrs == (a + (b + c)).attrs``. |
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.
Can you give an example when this happens?
| In practice attributes are very frequently dropped in binary operations. | ||
| This raises some questions about the usability of the mechanism. | ||
| Xarray's approach is more "useful", at the cost of consistency. | ||
| Xarray's mechanism furthermore necessiated complications, such as global settings that influence the behavior as well as certain interfaces with keyword arguments to define attribute handling. |
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.
| Xarray's mechanism furthermore necessiated complications, such as global settings that influence the behavior as well as certain interfaces with keyword arguments to define attribute handling. | |
| Xarray's mechanism furthermore necessitates complications, such as global settings that influence the behavior as well as certain interfaces with keyword arguments to define attribute handling. |
An attempt to describe our current reasoning. Did I forget anything?
Note that the ADR is marked as "draft", i.e., not something we have made a decision on.