@@ -28,6 +28,7 @@ Note that in Python, ``x[(exp1, exp2, ..., expN)]`` is equivalent to
28
28
``x[exp1, exp2, ..., expN] ``; the latter is just syntactic sugar
29
29
for the former.
30
30
31
+ .. _basic-indexing :
31
32
32
33
Basic indexing
33
34
--------------
@@ -88,6 +89,7 @@ that is subsequently indexed by 2.
88
89
rapidly changing location in memory. This difference represents a
89
90
great potential for confusion.
90
91
92
+ .. _slicing-and-striding :
91
93
92
94
Slicing and striding
93
95
^^^^^^^^^^^^^^^^^^^^
@@ -226,6 +228,7 @@ concepts to remember include:
226
228
.. index ::
227
229
pair: ndarray; view
228
230
231
+ .. _dimensional-indexing-tools :
229
232
230
233
Dimensional indexing tools
231
234
^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -470,6 +473,7 @@ such an array with an image with shape (ny, nx) with dtype=np.uint8
470
473
lookup table) will result in an array of shape (ny, nx, 3) where a
471
474
triple of RGB values is associated with each pixel location.
472
475
476
+ .. _boolean-indexing :
473
477
474
478
Boolean array indexing
475
479
^^^^^^^^^^^^^^^^^^^^^^
@@ -851,7 +855,7 @@ For this reason, it is possible to use the output from the
851
855
:meth: `np.nonzero() <ndarray.nonzero> ` function directly as an index since
852
856
it always returns a tuple of index arrays.
853
857
854
- Because the special treatment of tuples, they are not automatically
858
+ Because of the special treatment of tuples, they are not automatically
855
859
converted to an array as a list would be. As an example: ::
856
860
857
861
>>> z[[1, 1, 1, 1]] # produces a large array
0 commit comments