Skip to content

Commit

Permalink
Small fix for MultiPath values
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Dec 10, 2019
1 parent e5fb602 commit 26b22f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions holoviews/core/data/multipath.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,16 @@ def values(cls, dataset, dimension, expanded=True, flat=True,
if not dataset.data:
return np.array([])
values = []
is_scalar = True
ds = cls._inner_dataset_template(dataset)
is_points = cls.geom_type(type(dataset)) == 'Point'
for d in dataset.data:
ds.data = d
dvals = ds.interface.values(
ds, dimension, expanded, flat, compute, keep_index
)
if len(dvals) > 1:
is_scalar = False
if not len(dvals):
continue
elif expanded:
Expand All @@ -325,8 +328,8 @@ def values(cls, dataset, dimension, expanded=True, flat=True,
values.append(dvals)
if not values:
return np.array([])
elif expanded:
if not is_points:
elif expanded or is_scalar:
if not is_points and expanded:
values = values[:-1]
return np.concatenate(values) if values else np.array()
else:
Expand Down

0 comments on commit 26b22f3

Please sign in to comment.