8000 Merge pull request #21497 from meeseeksmachine/auto-backport-of-pr-21… · matplotlib/matplotlib@9210a7a · GitHub
[go: up one dir, main page]

Skip to content

Commit 9210a7a

Browse files
authored
Merge pull request #21497 from meeseeksmachine/auto-backport-of-pr-21484-on-v3.5.x
Backport PR #21484 on branch v3.5.x (Replacement for imread should return an array)
2 parents 245b511 + bd48949 commit 9210a7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ def imread(fname, format=None):
14861486
14871487
Passing a URL is deprecated. Please open the URL
14881488
for reading and pass the result to Pillow, e.g. with
1489-
``PIL.Image.open(urllib.request.urlopen(url))``.
1489+
``np.array(PIL.Image.open(urllib.request.urlopen(url)))``.
14901490
format : str, optional
14911491
The image file format assumed for reading the data. The image is
14921492
loaded as a PNG file if *format* is set to "png", if *fname* is a path
@@ -1542,7 +1542,7 @@ def imread(fname, format=None):
15421542
"deprecated since %(since)s and will no longer be supported "
15431543
"%(removal)s. Please open the URL for reading and pass the "
15441544
"result to Pillow, e.g. with "
1545-
"``PIL.Image.open(urllib.request.urlopen(url))``.")
1545+
"``np.array(PIL.Image.open(urllib.request.urlopen(url)))``.")
15461546
# hide imports to speed initial import on systems with slow linkers
15471547
from urllib import request
15481548
ssl_ctx = mpl._get_ssl_context()

0 commit comments

Comments
 (0)
0