Skip to content

Commit ab47376

Browse files
committed
don't treat the no data case differently
1 parent 8462acb commit ab47376

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

adaptive/learner/learner1D.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,10 @@ def plot(self):
590590
Plot of the evaluated data.
591591
"""
592592
hv = ensure_holoviews()
593-
if not self.data:
594-
p = hv.Scatter([]) * hv.Path([])
595-
elif not self.vdim > 1:
593+
if not self.vdim > 1:
596594
p = hv.Scatter(self.data) * hv.Path([])
597595
else:
598-
xs, ys = zip(*sorted(self.data.items()))
596+
xs, ys = zip(*sorted(self.data.items())) if self.data else [], []
599597
p = hv.Path((xs, ys)) * hv.Scatter([])
600598

601599
# Plot with 5% empty margins such that the boundary points are visible

0 commit comments

Comments
 (0)