8000 Update lib/matplotlib/colors.py · matplotlib/matplotlib@5e48fd8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e48fd8

Browse files
timhoffmgreglucas
andauthored
Update lib/matplotlib/colors.py
Co-authored-by: Greg Lucas <greg.m.lucas@gmail.com>
1 parent 6b1ce2a commit 5e48fd8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/matplotlib/colors.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,10 +1228,7 @@ def monochrome(self):
12281228
if not self._isinit:
12291229
self._init()
12301230

1231-
N = len(self._lut) - 3 # disregard over / under / bad
1232-
if N <= 1:
1233-
return True
1234-
return np.all(self._lut[0] == self._lut[1:N])
1231+
return self.N <=1 or np.all(self._lut[0] == self._lut[1:self.N])
12351232

12361233
def resampled(self, lutsize):
12371234
"""Return a new colormap with *lutsize* entries."""

0 commit comments

Comments
 (0)
0