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

Avoid Futurewarning for dim_size = ds.dims[dim] #211

Closed
veenstrajelmer opened this issue Feb 8, 2024 · 0 comments · Fixed by #212
Closed

Avoid Futurewarning for dim_size = ds.dims[dim] #211

veenstrajelmer opened this issue Feb 8, 2024 · 0 comments · Fixed by #212

Comments

@veenstrajelmer
Copy link
Collaborator

Xarray 2024.1.1 gives a futurewarning upon:
dim_size = ds.dims[dim]

[...]\site-packages\xugrid\ugrid\conventions.py:274: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
  dim_size = ds.dims[dim]
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 a pull request may close this issue.

1 participant