diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index fda85782689a..d11c8fd3b6df 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -623,7 +623,7 @@ def set_powerlimits(self, lims): def format_data_short(self, value): # docstring inherited - if isinstance(value, np.ma.MaskedArray) and value.mask: + if value is np.ma.masked: return "" if isinstance(value, Integral): fmt = "%d" diff --git a/lib/matplotlib/transforms.py b/lib/matplotlib/transforms.py index 78ce365c8a7b..59891ebea806 100644 --- a/lib/matplotlib/transforms.py +++ b/lib/matplotlib/transforms.py @@ -1854,7 +1854,7 @@ def transform_affine(self, points): # The major speed trap here is just converting to the # points to an array in the first place. If we can use # more arrays upstream, that should help here. - if not isinstance(points, (np.ma.MaskedArray, np.ndarray)): + if not isinstance(points, np.ndarray): _api.warn_external( f'A non-numpy array of type {type(points)} was passed in ' f'for transformation, which results in poor performance.')