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

Change dims to sizes to suppress future warning #714

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

maxrjones
Copy link
Contributor

This PR changes the use of ds.dims to ds.sizes to avoid the following future warning. The motivation for this PR is that this recurring warning can make it harder to notice other important warnings when running recipes.

python3.11/site-packages/pangeo_forge_recipes/rechunking.py:198: 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`.

@norlandrhagen norlandrhagen merged commit 055dbf1 into pangeo-forge:main Mar 27, 2024
7 checks passed
@maxrjones maxrjones deleted the future-warning branch March 28, 2024 14:19
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