10000 BUGFIX: ensure that number of classes is always of type INT in Colormap by bulli92 · Pull Request #2639 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

BUGFIX: ensure that number of classes is always of type INT in Colormap #2639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,13 +507,13 @@ def __init__(self, name, N=256):

"""
self.name = name
self.N = N
self.N = int(N) # ensure that N is always int
self._rgba_bad = (0.0, 0.0, 0.0, 0.0) # If bad, don't paint anything.
self._rgba_under = None
self._rgba_over = None
self._i_under = N
self._i_over = N + 1
self._i_bad = N + 2
self._i_under = self.N
self._i_over = self.N + 1
self._i_bad = self.N + 2
self._isinit = False

#: When this colormap exists on a scalar mappable and colorbar_extend
Expand Down
0