Skip to content

Commit ea96879

Browse files
authored
Merge pull request #24323 from meeseeksmachine/auto-backport-of-pr-24320-on-v3.6.x
Backport PR #24320 on branch v3.6.x (DOC: add warning note to imsave)
2 parents 28fb5d1 + c2fb20a commit ea96879

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/matplotlib/image.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,15 @@ def imread(fname, format=None):
15471547
def imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None,
15481548
origin=None, dpi=100, *, metadata=None, pil_kwargs=None):
15491549
"""
1550-
Save an array as an image file.
1550+
Colormap and save an array as an image file.
1551+
1552+
RGB(A) images are passed through. Single channel images will be
1553+
colormapped according to *cmap* and *norm*.
1554+
1555+
.. note ::
1556+
1557+
If you want to save a single channel image as gray scale please use an
1558+
image I/O library (such as pillow, tifffile, or imageio) directly.
15511559
15521560
Parameters
15531561
----------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy