-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Description
The inline/inpage sample code under the Array Interpolation schemes heading is incorrect. However, the Source Code linked below the inline code is correct.
For example, see In[20]:
In [20]: imgplot = plt.imshow(resized, interpolation="nearest")
which links to image_tutorial-9.py.
This sample code assumes the users has followed the previous inline sample code:
In [16]: from PIL import Image
In [17]: img = Image.open('../_static/stinkbug.png')
In [18]: resized = img.thumbnail((64, 64), Image.ANTIALIAS) # resizes image in-place
In [19]: imgplot = plt.imshow(img)
As shown on In [18], the thumbnail function resizes the image in-place. This means that resized is an empty variable and cannot be passed into plt.imshow(). The inline sample code should instead follow the downloadable sample code and pass img into plt.imshow().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels