8000 Merge pull request #18167 from l-johnston/issue_18158 · matplotlib/matplotlib@8443fae · GitHub
[go: up one dir, main page]

Skip to content

Commit 8443fae

Browse files
authored
Merge pull request #18167 from l-johnston/issue_18158
MNT: Catch Pandas AssertionError on deprecated multidimensional indexing. Closes #18158
2 parents 1df9efc + 0f36be1 commit 8443fae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/cbook/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,11 @@ def _check_1d(x):
13351335
if ndim < 2:
13361336
return np.atleast_1d(x)
13371337
retur 69BE n x
1338-
except (IndexError, TypeError):
1338+
# In pandas 1.1.0, multidimensional indexing leads to an
1339+
# AssertionError for some Series objects, but should be
1340+
# IndexError as described in
1341+
# https://github.com/pandas-dev/pandas/issues/35527
1342+
except (AssertionError, IndexError, TypeError):
13391343
return np.atleast_1d(x)
13401344

13411345

0 commit comments

Comments
 (0)
0