diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py index 0b64644205e4..35eec13ff440 100644 --- a/lib/matplotlib/cbook/__init__.py +++ b/lib/matplotlib/cbook/__init__.py @@ -1414,9 +1414,10 @@ def _check_1d(x): # This code should correctly identify and coerce to a # numpy array all pandas versions. with warnings.catch_warnings(record=True) as w: - warnings.filterwarnings("always", - category=DeprecationWarning, - module='pandas[.*]') + warnings.filterwarnings( + "always", + category=DeprecationWarning, + message='Support for multi-dimensional indexing') ndim = x[:, None].ndim # we have definitely hit a pandas index or series object