From 165299419c65dcfb313436cc1b06b81e820fe5e5 Mon Sep 17 00:00:00 2001 From: hannah Date: Fri, 31 Jan 2020 00:04:20 -0500 Subject: [PATCH] Backport PR #16379: FIX: catch on message content, not module --- lib/matplotlib/cbook/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py index 0ad0ac5e7d69..7de81661c546 100644 --- a/lib/matplotlib/cbook/__init__.py +++ b/lib/matplotlib/cbook/__init__.py @@ -2081,9 +2081,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