10000 Merge pull request #6132 from mdboom/dont-check-when-not-norming · matplotlib/matplotlib@8afb493 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8afb493

Browse files
committed
Merge pull request #6132 from mdboom/dont-check-when-not-norming
Don't check if in range if the caller passed norm
2 parents ee1a98c + 010c3fd commit 8afb493

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)
0