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

DataTree: selecting via [["a"]] suggests subset, which is missing #10014

Open
5 tasks
mathause opened this issue Jan 31, 2025 · 0 comments
Open
5 tasks

DataTree: selecting via [["a"]] suggests subset, which is missing #10014

mathause opened this issue Jan 31, 2025 · 0 comments
Labels
bug topic-DataTree Related to the implementation of a DataTree class

Comments

@mathause
Copy link
Collaborator

What happened?

calling dt[["a"]] suggests to use .subset which does not exist.

What did you expect to happen?

No response

Minimal Complete Verifiable Example

import xarray as xr
a = xr.Dataset(data_vars={"x": [10, 20]}, coords={"time": [0, 1]})

dt = xr.DataTree()
dt["a"] = a

dt[["a"]] # fails and suggests subset
dt.subset # fails

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.
  • Recent environment — the issue occurs with the latest version of xarray and its dependencies.

Relevant log output

Anything else we need to know?

No response

Environment

master

@mathause mathause added bug needs triage Issue that has not been reviewed by xarray team member topic-DataTree Related to the implementation of a DataTree class and removed needs triage Issue that has not been reviewed by xarray team member labels Jan 31, 2025
@mathause mathause changed the title selecting via tags and subset DataTree: selecting via [["a"]] suggests subset, which is missing Jan 31, 2025
@mathause mathause changed the title DataTree: selecting via [["a"]] suggests subset, which is missing DataTree: selecting via [["a"]] suggests subset, which is missing Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug topic-DataTree Related to the implementation of a DataTree class
Projects
None yet
Development

No branches or pull requests

1 participant