Skip to content

Commit 9962031

Browse files
authored
Merge pull request #23932 from StefRe/DOC/image_tutorial
DOC: Fix formatting in image tutorial
2 parents 1b4db29 + 293cdc4 commit 9962031

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tutorials/introductory/images.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
interface maintains global state, and is very useful for quickly and easily
4242
experimenting with various plot settings. The alternative is the explicit,
4343
which is more suitable for large application development. For an explanation
44-
of the tradeoffs between the implicit and explicit interfaces See
44+
of the tradeoffs between the implicit and explicit interfaces see
4545
:ref:`api_interfaces` and the :doc:`Quick start guide
4646
</tutorials/introductory/quick_start>` to start using the explicit interface.
4747
For now, let's get on with the implicit approach:
@@ -83,7 +83,7 @@
8383
###############################################################################
8484
# Each inner list represents a pixel. Here, with an RGB image, there
8585
# are 3 values. Since it's a black and white image, R, G, and B are all
86-
# similar. An RGBA (where A is alpha, or transparency), has 4 values
86+
# similar. An RGBA (where A is alpha, or transparency) has 4 values
8787
# per inner list, and a simple luminance image just has one value (and
8888
# is thus only a 2-D array, not a 3-D array). For RGB and RGBA images,
8989
# Matplotlib supports float32 and uint8 data types. For grayscale,
@@ -119,13 +119,11 @@
119119
# Pseudocolor is only relevant to single-channel, grayscale, luminosity
120120
# images. We currently have an RGB image. Since R, G, and B are all
121121
# similar (see for yourself above or in your data), we can just pick one
122-
# channel of our data:
122+
# channel of our data using array slicing (you can read more in the
123+
# `Numpy tutorial <https://numpy.org/doc/stable/user/quickstart.html
124+
# #indexing-slicing-and-iterating>`_):
123125

124126
lum_img = img[:, :, 0]
125-
126-
# This is array slicing. You can read more in the `Numpy tutorial
127-
# <https://numpy.org/doc/stable/user/quickstart.html>`_.
128-
129127
plt.imshow(lum_img)
130128

131129
###############################################################################

0 commit comments

Comments
 (0)