From ccb51e086b2e1c89fba4e67c1c52c7bf7652c426 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 31 Oct 2022 17:11:21 -0400 Subject: [PATCH] DOC: add warning note to imsave closes #3657 --- lib/matplotlib/image.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index 342a8b663372..7cf91b468aa5 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -1547,7 +1547,15 @@ def imread(fname, format=None): def imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None, origin=None, dpi=100, *, metadata=None, pil_kwargs=None): """ - Save an array as an image file. + Colormap and save an array as an image file. + + RGB(A) images are passed through. Single channel images will be + colormapped according to *cmap* and *norm*. + + .. note :: + + If you want to save a single channel image as gray scale please use an + image I/O library (such as pillow, tifffile, or imageio) directly. Parameters ---------- 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