Skip to content

Commit 461423c

Browse files
Correct minor tutorial typos (#149)
* add misc section to .gitignore to inlcude .DS_Store and .vscode/ * fix typos in online-tutorial 01_xarray_fundamentals.ipynb * fix index mismatch in online-tutorial 02_indexing.ipynb * fix typos in online-tutorial 03_computation.ipynb * fix broken image link for pint in overview/xarray-in-45-min.ipynb * Apply suggestions from code review Co-authored-by: Deepak Cherian <[email protected]>
1 parent eca8a51 commit 461423c

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,7 @@ venv.bak/
114114

115115
# mypy
116116
.mypy_cache/
117+
118+
# misc
119+
.DS_Store
120+
.vscode/

overview/xarray-in-45-min.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@
925925
"\n",
926926
"<img src=\"https://raw.githubusercontent.com/cupy/cupy.dev/master/images/cupy_logo.png\" width=\"22%\"> [GPU arrays](https://cupy.dev) & [cupy-xarray](https://cupy-xarray.readthedocs.io/)\n",
927927
"\n",
928-
"<img src=\"https://pint.readthedocs.io/en/stable/_images/logo-full.jpg\" width=\"10%\"> **pint** : [unit-aware arrays](https://pint.readthedocs.io) & [pint-xarray](https://github.com/xarray-contrib/pint-xarray)\n"
928+
"<img src=\"https://pint.readthedocs.io/en/stable/_static/logo-full.jpg\" width=\"10%\"> **pint** : [unit-aware arrays](https://pint.readthedocs.io) & [pint-xarray](https://github.com/xarray-contrib/pint-xarray)\n"
929929
]
930930
},
931931
{

workshops/online-tutorial-series/01_xarray_fundamentals.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
" Implementing such functionality is left to individual users and\n",
3333
" domain-specific packages.\n",
3434
"\n",
35-
"- xarry expands on the capabilities of NumPy arrays, providing a lot of\n",
35+
"- xarray expands on the capabilities of NumPy arrays, providing a lot of\n",
3636
" streamline data manipulation.\n",
3737
"\n",
3838
"- Xarray's interface is based largely on the netCDF data model (variables,\n",
@@ -236,7 +236,7 @@
236236
"metadata": {},
237237
"outputs": [],
238238
"source": [
239-
"# Extract the sst variable/datarray\n",
239+
"# Extract the sst Variable/DataArray\n",
240240
"ds[\"sst\"] # Equivalent to ds.sst"
241241
]
242242
},
@@ -260,7 +260,7 @@
260260
"metadata": {},
261261
"outputs": [],
262262
"source": [
263-
"# dataarray/variable dimensions\n",
263+
"# DataArray/Variable dimensions\n",
264264
"ds.sst.dims"
265265
]
266266
},
@@ -270,7 +270,7 @@
270270
"metadata": {},
271271
"outputs": [],
272272
"source": [
273-
"# datarray/variable coordinates\n",
273+
"# DataArray/Variable coordinates\n",
274274
"ds.sst.coords"
275275
]
276276
},
@@ -280,7 +280,7 @@
280280
"metadata": {},
281281
"outputs": [],
282282
"source": [
283-
"# dataarray/variable attributes\n",
283+
"# DataArray/Variable attributes\n",
284284
"ds.sst.attrs"
285285
]
286286
},
@@ -345,7 +345,7 @@
345345
},
346346
"outputs": [],
347347
"source": [
348-
"# extracting a coorindate variable from .coords\n",
348+
"# extracting a coordinate variable from .coords\n",
349349
"ds.coords[\"time\"]"
350350
]
351351
},
@@ -389,7 +389,7 @@
389389
"metadata": {},
390390
"outputs": [],
391391
"source": [
392-
"# Set some arbitrary attribute on a data variable/datarray\n",
392+
"# Set some arbitrary attribute on a data Variable/DataArray\n",
393393
"ds.sst.attrs[\"my_custom_attribute\"] = \"Foo Bar\"\n",
394394
"ds.sst.attrs"
395395
]

workshops/online-tutorial-series/02_indexing.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"metadata": {},
104104
"source": [
105105
"<div class=\"alert alert-block alert-warning\">\n",
106-
"but wait, what labels go with 10 and 20? Was that lat/lon or lon/lat? Where are the timestamps that go along with this time-series?\n",
106+
"but wait, what labels go with 20 and 40? Was that lat/lon or lon/lat? Where are the timestamps that go along with this time-series?\n",
107107
"</div>\n"
108108
]
109109
},

workshops/online-tutorial-series/03_computation.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898
"**Broadcasting** allows an operator or a function to act on two or more arrays\n",
9999
"to operate even if these arrays do not have the same shape. That said, not all\n",
100100
"the dimensions can be subjected to broadcasting; they must meet certain rules.\n",
101-
"The image below t illustrates how performing an operation on arrays with\n",
102-
"differenty coordinates will result in automatic broadcasting\n",
101+
"The image below illustrates how performing an operation on arrays with\n",
102+
"differently coordinates will result in automatic broadcasting\n",
103103
"\n",
104104
"![](../../images/broadcasting.png)\n",
105105
"\n",

0 commit comments

Comments
 (0)