Skip to content

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

Open
@mathause

Description

@mathause

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtopic-DataTreeRelated to the implementation of a DataTree class

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions