10000 Replacement for imread should return an array by Debilski · Pull Request #21484 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Replacement for imread should return an array #21484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ def imread(fname, format=None):

Passing a URL is deprecated. Please open the URL
for reading and pass the result to Pillow, e.g. with
``PIL.Image.open(urllib.request.urlopen(url))``.
``np.array(PIL.Image.open(urllib.request.urlopen(url)))``.
format : str, optional
The image file format assumed for reading the data. The image is
loaded as a PNG file if *format* is set to "png", if *fname* is a path
Expand Down Expand Up @@ -1519,7 +1519,7 @@ def imread(fname, format=None):
"deprecated since %(since)s and will no longer be supported "
"%(removal)s. Please open the URL for reading and pass the "
"result to Pillow, e.g. with "
"``PIL.Image.open(urllib.request.urlopen(url))``.")
"``np.array(PIL.Image.open(urllib.request.urlopen(url)))``.")
# hide imports to speed initial import on systems with slow linkers
from urllib import request
ssl_ctx = mpl._get_ssl_context()
Expand Down
0