Skip to content

Commit

Permalink
Use keyword argument for nan=0 (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
tien-vo authored Oct 14, 2024
1 parent 2ce8afb commit 579bc17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fundamentals/03.1_computation_with_xarray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
},
"outputs": [],
"source": [
"np.nan_to_num(ds.sst, 0)"
"np.nan_to_num(ds.sst, nan=0)"
]
},
{
Expand All @@ -167,7 +167,7 @@
"metadata": {},
"outputs": [],
"source": [
"xr.apply_ufunc(np.nan_to_num, ds.sst, 0)"
"xr.apply_ufunc(np.nan_to_num, ds.sst, kwargs={\"nan\": 0})"
]
},
{
Expand Down

0 comments on commit 579bc17

Please sign in to comment.