Skip to content

Commit 77cc402

Browse files
committed
Fix example code in README
1 parent a4d78cb commit 77cc402

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ A lightweight convenience wrapper for using CF attributes on xarray objects. Rig
5656
5757
ds.air.attrs["cell_measures"] = "area: cell_area"
5858
ds.coords["cell_area"] = (
59-
xr.DataArray(np.cos(ds.cf["latitude"] * np.pi / 180))
60-
* xr.ones_like(ds.cf["longitude"])
59+
np.cos(ds.air.cf["latitude"] * np.pi / 180)
60+
* xr.ones_like(ds.air.cf["longitude"])
6161
* 105e3
6262
* 110e3
6363
)

0 commit comments

Comments
 (0)