Skip to content

Commit 579bc17

Browse files
authored
Use keyword argument for nan=0 (#300)
1 parent 2ce8afb commit 579bc17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fundamentals/03.1_computation_with_xarray.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
},
150150
"outputs": [],
151151
"source": [
152-
"np.nan_to_num(ds.sst, 0)"
152+
"np.nan_to_num(ds.sst, nan=0)"
153153
]
154154
},
155155
{
@@ -167,7 +167,7 @@
167167
"metadata": {},
168168
"outputs": [],
169169
"source": [
170-
"xr.apply_ufunc(np.nan_to_num, ds.sst, 0)"
170+
"xr.apply_ufunc(np.nan_to_num, ds.sst, kwargs={\"nan\": 0})"
171171
]
172172
},
173173
{

0 commit comments

Comments
 (0)