Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0fc3614

Browse files
authored
Merge pull request #18174 from meeseeksmachine/auto-backport-of-pr-18167-on-v3.3.x
Backport PR #18167 on branch v3.3.x (Catch Pandas AssertionError on deprecated multidimensional indexing. Closes #18158)
2 parents 0c3c37d + bc1a725 commit 0fc3614

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
@@ -1326,7 +1326,11 @@ def _check_1d(x):
13261326
if ndim < 2:
13271327
return np.atleast_1d(x)
13281328
return x
1329-
except (IndexError, TypeError):
1329+
# In pandas 1.1.0, multidimensional indexing leads to an
1330+
# AssertionError for some Series objects, but should be
1331+
# IndexError as described in
1332+
# https://github.com/pandas-dev/pandas/issues/35527
1333+
except (AssertionError, IndexError, TypeError):
13301334
return np.atleast_1d(x)
13311335

13321336

0 commit comments

Comments
 (0)