Skip to content

Commit

Permalink
DAS-2155: Fix build errors in docs for numpy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
flamingbear committed Jul 24, 2024
1 parent bf4413b commit 068bab2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions doc/user-guide/data-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ or by dynamically updating the attributes of one node to refer to another:
.. ipython:: python
# add a second child by first creating a new node ...
ds3 = xr.Dataset({"zed": np.NaN})
ds3 = xr.Dataset({"zed": np.nan})
node3 = xr.DataTree(name="b", data=ds3)
# ... then updating its .parent property
node3.parent = dt
Expand Down Expand Up @@ -674,7 +674,7 @@ datatree from scratch, we could have written:
dt = xr.DataTree(name="root")
dt["foo"] = "orange"
dt["a"] = xr.DataTree(data=xr.Dataset({"bar": 0}, coords={"y": ("y", [0, 1, 2])}))
dt["a/b/zed"] = np.NaN
dt["a/b/zed"] = np.nan
dt
To change the variables in a node of a ``DataTree``, you can use all the
Expand Down
2 changes: 1 addition & 1 deletion doc/user-guide/hierarchical-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ we can construct a complex tree quickly using the alternative constructor :py:me
d = {
"/": xr.Dataset({"foo": "orange"}),
"/a": xr.Dataset({"bar": 0}, coords={"y": ("y", [0, 1, 2])}),
"/a/b": xr.Dataset({"zed": np.NaN}),
"/a/b": xr.Dataset({"zed": np.nan}),
"a/c/d": None,
}
dt = xr.DataTree.from_dict(d)
Expand Down

0 comments on commit 068bab2

Please sign in to comment.