diff --git a/lib/matplotlib/cm.py b/lib/matplotlib/cm.py index e9a7aad6c456..c14973560ac3 100644 --- a/lib/matplotlib/cm.py +++ b/lib/matplotlib/cm.py @@ -362,7 +362,7 @@ def to_rgba(self, x, alpha=None, bytes=False, norm=True): if xx.dtype.kind == 'f': # If any of R, G, B, or A is nan, set to 0 if np.any(nans := np.isnan(x)): - if xx.shape[2] == 4: + if x.shape[2] == 4: xx = xx.copy() xx[np.any(nans, axis=2), :] = 0
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: