diff --git a/intermediate/01-high-level-computation-patterns.ipynb b/intermediate/01-high-level-computation-patterns.ipynb index e5f17c1c..13c5f261 100644 --- a/intermediate/01-high-level-computation-patterns.ipynb +++ b/intermediate/01-high-level-computation-patterns.ipynb @@ -657,7 +657,7 @@ ":class: dropdown\n", "\n", "```python\n", - "data.coarsen(lat=5, lon=5, boundary=\"trim\").reduce(np.mean).plot();\n", + "data.coarsen(lat=5, lon=5, boundary=\"trim\").reduce(np.ptp).plot();\n", "```\n", ":::\n", "::::" diff --git a/intermediate/indexing/advanced-indexing.ipynb b/intermediate/indexing/advanced-indexing.ipynb index ca3f2d5c..a5538151 100644 --- a/intermediate/indexing/advanced-indexing.ipynb +++ b/intermediate/indexing/advanced-indexing.ipynb @@ -154,7 +154,7 @@ "\n", "ds = xr.tutorial.load_dataset(\"air_temperature\")\n", "da_air = ds.air\n", - "ds" + "da_air" ] }, { @@ -171,7 +171,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "👆 please notice how the output of the indexing example above resulted in an array of size `3x4`" + "👆 Please note that the output shape in the example above is `4x3` because the latitude indexer selects 4 rows, and the longitude indexer selects 3 columns." ] }, { @@ -239,7 +239,9 @@ "To trigger vectorized indexing behavior, you will need to provide the selection dimensions with a new **shared** output dimension name. This means that the dimensions of both indexers must be the same, and the output will have the same dimension name as the indexers.\n", "```\n", "\n", - "Let's see how this works with an example. A researcher wants to find the nearest climate model grid cell to a collection of observation sites. She has the latitude and longitude of the observation sites as following:" + "Let's see how this works with an example:\n", + "\n", + "A researcher wants to find the nearest climate model grid cell to a collection of observation sites. They have the latitude and longitude of the observation sites as following:" ] }, { @@ -257,7 +259,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "If the researcher use the lists to index the DataArray, they will get the orthogonal indexing behavior, which is not what they wants." + "If the researcher use the lists to index the DataArray, they will get the orthogonal indexing behavior, which is not what they want." ] }, {