Skip to content

Deprecate checking coordinates in DataArray.__contains__ #1645

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

Merged
merged 2 commits into from
Oct 25, 2017

Conversation

shoyer
Copy link
Member

@shoyer shoyer commented Oct 22, 2017

In the future, this should check array values. For now, issue a FutureWarning.

In the future, this should check array values. For now, add a deprecation
warning.

xref GH1267
if self.dim in self.obj.coords:
concat_dim = self.window_labels
else:
concat_dim = self.dim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this the only place we were looking for coords in this way?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were a couple more. Verified by converting the warning into an error and running the test suite.

@shoyer shoyer merged commit 3061db6 into pydata:master Oct 25, 2017
@shoyer shoyer deleted the deprecate-DataArray-contains branch October 25, 2017 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants