Skip to content

Commit a24d4f2

Browse files
committed
plot_multi_series_zoom: fixes for no data
1 parent 63c0707 commit a24d4f2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

quimb/utils_plot.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _ensure_dict(k, v):
6666
v = {"y": v}
6767
v["y"] = np.asarray(v["y"])
6868

69-
if v["y"].size == 0:
69+
if v["y"].size < 2:
7070
return None
7171

7272
# make sure x-coords exists explicitly
@@ -122,6 +122,9 @@ def plot_multi_series_zoom(
122122

123123
nrows = len(data)
124124

125+
if nrows == 0:
126+
return None, None
127+
125128
if figsize is None:
126129
figsize = (8, 2 * nrows)
127130

0 commit comments

Comments
 (0)