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 5d56c1c commit 3f6df2eCopy full SHA for 3f6df2e
lib/matplotlib/cbook/__init__.py
@@ -1416,6 +1416,8 @@ def _reshape_2D(X, name):
1416
"""
1417
# Iterate over columns for ndarrays, over rows otherwise.
1418
X = np.atleast_1d(X.T if isinstance(X, np.ndarray) else np.asarray(X))
1419
+ if len(X) == 0:
1420
+ return [[]]
1421
if X.ndim == 1 and not isinstance(X[0], collections.abc.Iterable):
1422
# 1D array of scalars: directly return it.
1423
return [X]
0 commit comments