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

Address a few warnings #155

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

Address a few warnings #155

wants to merge 2 commits into from

Conversation

zmoon
Copy link
Member

@zmoon zmoon commented Sep 5, 2024

These warnings:

tests/test_remap.py::test_combine_da_da
  /home/runner/work/monet/monet/monet/monet_accessor.py:197: UserWarning: rename 'longitude' to 'x' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.
    dset = dset.rename({lon_name: "x", lat_name: "y"})

tests/test_remap.py::test_combine_da_da
  /home/runner/work/monet/monet/monet/monet_accessor.py:197: UserWarning: rename 'latitude' to 'y' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.
    dset = dset.rename({lon_name: "x", lat_name: "y"})

tests/test_remap.py::test_combine_da_da
  /home/runner/work/monet/monet/tests/test_remap.py:98: 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`.
    assert new.dims == {"z": 5, "y": n, "x": n}

tests/test_remap.py::test_combine_da_da
  /home/runner/work/monet/monet/tests/test_remap.py:108: 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`.
    assert a.shape == (model.dims["z"], n), "model levels but obs grid points"

In response to this warning:

UserWarning: rename 'longitude' to 'x' does not create an index anymore.
Try using swap_dims instead or use set_index after rename to create an indexed coordinate.
    dset = dset.rename({lon_name: "x", lat_name: "y"})
since dims may change to tuple of dim names in future
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.

1 participant