Skip to content

Commit

Permalink
Simplify expression
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Feb 9, 2016
1 parent 4cf6a9e commit 6df0c67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/matplotlib/cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def to_rgba(self, x, alpha=None, bytes=False, norm=True):
# For floating-point greyscale images, we treat negative as
# transparent so we copy that over to the alpha channel
if x.ndim == 2 and x.dtype.kind == 'f':
rgba[:, :, 3] = np.where(x < 0.0, 0, rgba[:, :, 3])
rgba[:, :, 3][x < 0.0] = 0
return rgba

def set_array(self, A):
Expand Down

0 comments on commit 6df0c67

Please sign in to comment.