We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f30de35 commit df4b7dcCopy full SHA for df4b7dc
lib/matplotlib/cbook/__init__.py
@@ -1326,10 +1326,12 @@ def _check_1d(x):
1326
return np.atleast_1d(x)
1327
else:
1328
try:
1329
- shape = x[:, None].shape
+ ndim = x[:, None].ndim
1330
# work around https://github.com/pandas-dev/pandas/issues/27775
1331
- # which mean the shape is not as expected
1332
- if len(shape) != 2:
+ # which mean the shape is not as expected. That this ever worked
+ # was an unintentional quirk of pandas the above line will raise
1333
+ # an exception in the future.
1334
+ if ndim < 2:
1335
1336
return x
1337
except (IndexError, TypeError):
0 commit comments