Skip to content

Commit 010c3fd

Browse files
committed
Don't check if in range if the caller passed norm
since that indicates the data is already normalized
1 parent 0d1422b commit 010c3fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/cm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def to_rgba(self, x, alpha=None, bytes=False, norm=True):
255255
else:
256256
raise ValueError("third dimension must be 3 or 4")
257257
if xx.dtype.kind == 'f':
258-
if xx.max() > 1 or xx.min() < 0:
258+
if norm and xx.max() > 1 or xx.min() < 0:
259259
raise ValueError("Floating point image RGB values "
260260
"must be in the 0..1 range.")
261261
if bytes:

0 commit comments

Comments
 (0)