8000 fix logic error in ScalarMappable.to_rgba · matplotlib/matplotlib@0b6fff1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b6fff1

Browse files
committed
fix logic error in ScalarMappable.to_rgba
1 parent 4966c3f commit 0b6fff1

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

0 commit comments

Comments
 (0)
0