Skip to content
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

Shouldn't .where() pass the attributes of DataArrays and DataSets? #1009

Closed
fmaussion opened this issue Sep 19, 2016 · 4 comments
Closed

Shouldn't .where() pass the attributes of DataArrays and DataSets? #1009

fmaussion opened this issue Sep 19, 2016 · 4 comments
Labels
topic-metadata Relating to the handling of metadata (i.e. attrs and encoding)

Comments

@fmaussion
Copy link
Member

Everything is in the title! I think it should, if possible.

@shoyer
Copy link
Member

shoyer commented Sep 19, 2016

Yes, I agree. .fillna() should also preserve attributes.

@fmaussion
Copy link
Member Author

With a keep_attrs keyword, like .mean(), or always?

Since we are at it: what was the rationale behind not keeping the attributes per default everywhere?

@shoyer
Copy link
Member

shoyer commented Sep 19, 2016

I think we can keep attributes always for this operations.

The line I tried to draw was:

  • For operations that rearrange/manipulate existing data, keep attributes
  • For operations that do computation to produce new data, drop attributes

@fmaussion
Copy link
Member Author

OK, that makes sense. It gives me some trouble with the geoloc accessor I am working on, but that's another story.

I'll try to put a PR together soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-metadata Relating to the handling of metadata (i.e. attrs and encoding)
Projects
None yet
Development

No branches or pull requests

3 participants