Skip to content
Permalink
Browse files

Handled scalar values in dynamic Dataset.groupby

  • Loading branch information...
Philipp Rudiger Philipp Rudiger
Philipp Rudiger authored and Philipp Rudiger committed Jun 4, 2016
1 parent c4fd856 commit 266480d78c91bcaba7f242f14d535436d3b1c350
Showing with 5 additions and 1 deletion.
  1. +5 −1 holoviews/core/data/__init__.py
@@ -381,7 +381,11 @@ def groupby(self, dimensions=[], container_type=HoloMap, group_type=None,
group_dims = [d.name for d in self.kdims if d not in dimensions]
def load_subset(*args):
constraint = dict(zip(dim_names, args))
return group_type(self.select(**constraint).reindex(group_dims))
group = self.select(**constraint)
if np.isscalar(group):
return group_type(([group],), group=self.group,
label=self.label, vdims=self.vdims)
return group_type(group).reindex(group_dims)
dynamic_dims = [d(values=list(self.interface.values(self, d.name, False)))
for d in dimensions]
return DynamicMap(load_subset, kdims=dynamic_dims)

0 comments on commit 266480d

Please sign in to comment.
You can’t perform that action at this time.