@@ -23,8 +23,8 @@ Data Structures
2323DataTree
2424--------
2525
26- :py:class: `` DataTree` ` is xarray's highest-level data structure, able to organise heterogeneous data which
27- could not be stored inside a single `` Dataset ` ` object. This includes representing the recursive structure of multiple
26+ :py:class: `DataTree ` is xarray's highest-level data structure, able to organise heterogeneous data which
27+ could not be stored inside a single :py:class: ` Dataset ` object. This includes representing the recursive structure of multiple
2828`groups `_ within a netCDF file or `Zarr Store `_.
2929
3030.. _groups : https://www.unidata.ucar.edu/software/netcdf/workshops/2011/groups-types/GroupsIntro.html
@@ -128,8 +128,8 @@ It is at tree construction time that consistency checks are enforced. For instan
128128 Alternatively you can also create a ``DataTree `` object from
129129
130130- An ``xarray.Dataset `` using ``Dataset.to_node() `` (not yet implemented),
131- - A dictionary mapping directory-like paths to either ``DataTree `` nodes or data, using `` DataTree.from_dict() ` `,
132- - A netCDF or Zarr file on disk with `` open_datatree() ` `. See :ref: `reading and writing files <io >`.
131+ - A dictionary mapping directory-like paths to either ``DataTree `` nodes or data, using :py:meth: ` DataTree.from_dict() `,
132+ - A netCDF or Zarr file on disk with :py:func: ` open_datatree() `. See :ref: `reading and writing files <io >`.
133133
134134
135135DataTree Contents
@@ -152,7 +152,7 @@ We can also access all the data in a single node through a dataset-like view
152152
153153 This demonstrates the fact that the data in any one node is equivalent to the contents of a single ``xarray.Dataset `` object.
154154The ``DataTree.ds `` property returns an immutable view, but we can instead extract the node's data contents as a new (and mutable)
155- ``xarray.Dataset `` object via `` .to_dataset() ` `:
155+ ``xarray.Dataset `` object via :py:meth: ` DataTree .to_dataset() `:
156156
157157.. ipython :: python
158158
@@ -184,10 +184,10 @@ For example, to create this example datatree from scratch, we could have written
184184
185185 To change the variables in a node of a ``DataTree ``, you can use all the standard dictionary
186186methods, including ``values ``, ``items ``, ``__delitem__ ``, ``get `` and
187- :py:meth: `~xarray. DataTree.update `.
187+ :py:meth: `DataTree.update `.
188188Note that assigning a ``DataArray `` object to a ``DataTree `` variable using ``__setitem__ `` or ``update `` will
189- :ref: `automatically align<update> ` the array(s) to the original node's indexes.
189+ :ref: `automatically align <update >` the array(s) to the original node's indexes.
190190
191- If you copy a ``DataTree `` using the `` :py:func:: copy `` function or the :py:meth: `~xarray. DataTree.copy ` it will copy the subtree,
191+ If you copy a ``DataTree `` using the :py:func: ` copy ` function or the :py:meth: `DataTree.copy ` method it will copy the subtree,
192192meaning that node and children below it, but no parents above it.
193193Like for ``Dataset ``, this copy is shallow by default, but you can copy all the underlying data arrays by calling ``dt.copy(deep=True) ``.
0 commit comments