MCPcopy Index your code
hub / github.com/pydata/xarray / __init__

Method __init__

xarray/core/treenode.py:76–83  ·  view source on GitHub ↗

Create a parentless node.

(self, children: Mapping[str, Self] | None = None)

Source from the content-addressed store, hash-verified

74 _children: dict[str, Self]
75
76 def __init__(self, children: Mapping[str, Self] | None = None):
77 """Create a parentless node."""
78 self._parent = None
79 self._children = {}
80
81 if children:
82 # shallow copy to avoid modifying arguments in-place (see GH issue #9196)
83 self.children = {name: child.copy() for name, child in children.items()}
84
85 @property
86 def parent(self) -> Self | None:

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected