-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
keep attrs when reducing xray objects #138
Comments
This seems fine by me. @akleeman Your thoughts? |
Yeah I agree, seems like a great option to have. |
Why not options like 'first', 'common', etc?
|
@ebrevdo This is for reduce operations like "mean" which are unary operators. But it does seem like a good idea to consider if/how this could be extended to binary operations (e.g., "merge" or "add"). To make this an option for mathematical operations like "add" we would need to add an |
Reduction operations currently drop all
Variable
andDataset
attrs
when a reduction operation is performed. I'm proposing adding a keyword to these methods to allow for copying of the originalVariable
orDataset
attrs
.The default value of the
keep_attrs
keyword would beFalse
.For example:
returns
new
with all theVariable
andDataset
attrs
asds
contained.Some previous discussion in #131 and #137.
The text was updated successfully, but these errors were encountered: