Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 293cdc4

Browse filesBrowse files
committed
DOC: Fix formatting in image tutorial
Turn python comment with link to numpy docs into rst link and fix minor typos.
1 parent 21493c5 commit 293cdc4
Copy full SHA for 293cdc4

File tree

Expand file treeCollapse file tree

1 file changed

+5
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-7
lines changed

‎tutorials/introductory/images.py

Copy file name to clipboardExpand all lines: tutorials/introductory/images.py
+5-7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.