|
|
@ -1731,32 +1731,27 @@ indexes = <array>.argmin(<axis>) |
|
|
|
* **Axis is an index of dimension, that gets collapsed.** |
|
|
|
|
|
|
|
### Indexing |
|
|
|
#### Basic indexing: |
|
|
|
```bash |
|
|
|
<el> = <2d_array>[0, 0] |
|
|
|
``` |
|
|
|
|
|
|
|
#### Basic slicing: |
|
|
|
#### Basic: |
|
|
|
```bash |
|
|
|
<el> = <2d_array>[0, 0] # First element. |
|
|
|
<1d_view> = <2d_array>[0] # First row. |
|
|
|
<1d_view> = <2d_array>[:, 0] # First column. Also [..., 0]. |
|
|
|
<3d_view> = <2d_array>[None, :, :] # Expanded by dimension of size 1. |
|
|
|
``` |
|
|
|
|
|
|
|
#### Integer array indexing: |
|
|
|
#### Advanced: |
|
|
|
```bash |
|
|
|
<1d_array> = <2d_array>[<1d_row_indexes>, <1d_column_indexes>] |
|
|
|
<2d_array> = <2d_array>[<2d_row_indexes>, <2d_column_indexes>] |
|
|
|
``` |
|
|
|
|
|
|
|
* **If row and column indexes differ in shape, they are combined with broadcasting.** |
|
|
|
|
|
|
|
#### Boolean array indexing: |
|
|
|
```bash |
|
|
|
<2d_bools> = <2d_array> > 0 |
|
|
|
<1d_array> = <2d_array>[<2d_bools>] |
|
|
|
``` |
|
|
|
|
|
|
|
* **If row and column indexes differ in shape, they are combined with broadcasting.** |
|
|
|
|
|
|
|
### Broadcasting |
|
|
|
**Broadcasting is a set of rules by which NumPy functions operate on arrays of different sizes and/or dimensions.** |
|
|
|
|
|
|
|