8000 Merge pull request #11011 from matplotlib/auto-backport-of-pr-11002 · matplotlib/matplotlib@24a7231 · GitHub
[go: up one dir, main page]

Skip to content

Commit 24a7231

Browse files
authored
Merge pull request #11011 from matplotlib/auto-backport-of-pr-11002
Backport PR #11002 on branch v2.2.x
2 parents d46e69a + 790c210 commit 24a7231

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
@@ -252,7 +252,7 @@ def to_rgba(self, x, alpha=None, bytes=False, norm=True):
252252
else:
253253
raise ValueError("third dimension must be 3 or 4")
254254
if xx.dtype.kind == 'f':
255-
if norm and xx.max() > 1 or xx.min() < 0:
255+
if norm and (xx.max() > 1 or xx.min() < 0):
256256
raise ValueError("Floating point image RGB values "
257257
"must be in the 0..1 range.")
258258
if bytes:

0 commit comments

Comments
 (0)
0