Skip to content

Commit 77a0446

Browse files
committed
FIX: check_1d for ValueError as well
1 parent 0548b11 commit 77a0446

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/cbook/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,9 @@ def _check_1d(x):
13391339
# AssertionError for some Series objects, but should be
13401340
# IndexError as described in
13411341
# https://github.com/pandas-dev/pandas/issues/35527
1342-
except (AssertionError, IndexError, TypeError):
1342+
# and it leads to a ValueError:
1343+
# https://github.com/matplotlib/matplotlib/issues/22125
1344+
except (AssertionError, IndexError, TypeError, ValueError):
13431345
return np.atleast_1d(x)
13441346

13451347

0 commit comments

Comments
 (0)