You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/source/data-structures.rst
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,10 +66,12 @@ The overall structure is technically a `connected acyclic undirected rooted grap
66
66
Again these are not normally used unless explicitly accessed by the user.
67
67
68
68
69
+
.. _creating a datatree:
70
+
69
71
Creating a DataTree
70
72
~~~~~~~~~~~~~~~~~~~
71
73
72
-
There are two ways to create a ``DataTree`` from scratch. The first is to create each node individually,
74
+
There are three ways to create a ``DataTree`` from scratch. The first is to create each node individually,
73
75
specifying the nodes' relationship to one another as you create each one.
74
76
75
77
The ``DataTree`` constructor takes:
@@ -144,8 +146,8 @@ we can construct a complex tree quickly using the alternative constructor ``:py:
144
146
Notice that this method will also create any intermediate empty node necessary to reach the end of the specified path
145
147
(i.e. the node labelled `"c"` in this case.)
146
148
147
-
Finally if you have a file containing data on disk (such as a netCDF file or a Zarr Store), you can also create a datatree by opening the
148
-
file using ``:py:func::~datatree.open_datatree``.
149
+
Finally the third way is from a file. if you have a file containing data on disk (such as a netCDF file or a Zarr Store), you can also create a datatree by opening the
150
+
file using ``:py:func::~datatree.open_datatree``. See the page on :ref:`reading and writing files <io>` for more details.
0 commit comments