Skip to content

Commit

Permalink
corrections in ch02 (end)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldorman committed Oct 8, 2024
1 parent c3a9731 commit 50f56a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 02-attribute-operations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ elev = src_elev.read(1)
elev
```

Then, we can access any subset of cell values using **numpy** methods, keeping in mind that dimensions order is `(rows, columns)`.
Then, we can access any subset of cell values using **numpy** methods, keeping in mind that dimensions order is `(rows,columns)`.
For example, `elev[1,2]` returns the value at row 2, column 3.

```{python}
Expand Down Expand Up @@ -494,7 +494,7 @@ elev3d
You can see that the above array is three-dimensional according to the number of brackets `[`, or check explicitly using `.shape` or `.ndim`.
:::

In three-dimensional arrays, we access cell values using three indices, keeping in mind that dimensions order is `(layers,rows, columns)`
In three-dimensional arrays, we access cell values using three indices, keeping in mind that dimensions order is `(layers,rows,columns)`
For example, to get the same value shown above, at row 2, column 3 (at band 1), we use `elev[0,1,2]` instead of `elev[1,2]`.

```{python}
Expand Down

0 comments on commit 50f56a6

Please sign in to comment.