Skip to content

Taking a list of ds.dims does not raise warning #9799

Closed
@hoxbro

Description

@hoxbro

What is your issue?

Take the following example:

import xarray as xr
ds = xr.tutorial.open_dataset('air_temperature')

ds.dims["time"]  # Emits: The return type of `Dataset.dims` will be changed to return a set of ...
list(ds.dims)  # Does not emit a warning

I think __iter__ should also emit a warning, but I'm unsure if the decision not to do it is deliberate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions