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

Warn on automatic coercion to coordinate variables in Dataset constructor #8979

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

TomNicholas
Copy link
Member

@TomNicholas TomNicholas commented Apr 28, 2024

@TomNicholas
Copy link
Member Author

Tests will fail due to this new warning until I change all the constructors to use coords=...

@shoyer
Copy link
Member

shoyer commented Apr 29, 2024

Hmm. I'm not sure how much adding vars as a new argument helps, given that we are issuing the exact deprecation warning in both cases.

Maybe we issue the warning only in the case where the user specifies data_vars, but not if they specify vars? Then the recommendation (if you see the warning) would either be to:

  1. Move coordinate variables explicitly into coords, or
  2. Use the vars keyword argument instead of data_vars

with both solutions silencing the warning.

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