Skip to content

Commit

Permalink
Merge pull request #1270 from ioam/dynamicmap_tutorial_fixes
Browse files Browse the repository at this point in the history
DynamicMap tutorial fixes
  • Loading branch information
jlstevens committed Apr 11, 2017
2 parents 390c5e8 + 3c5afe2 commit d5a8d34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions holoviews/core/spaces.py
Expand Up @@ -1034,7 +1034,9 @@ def inner_fn(*inner_key):
dim_vals = [(d.name, d.values) for d in inner_kdims]
dim_vals += [(d.name, [v]) for d, v in
zip(outer_kdims, util.wrap_tuple(outer_key))]
return group_type(self.select(**dict(dim_vals))).reindex(inner_kdims)
with item_check(False):
selected = HoloMap(self.select(**dict(dim_vals)))
return group_type(selected.reindex(inner_kdims))
if outer_kdims:
return self.clone([], callback=outer_fn, kdims=outer_kdims)
else:
Expand All @@ -1059,7 +1061,9 @@ def inner_fn(outer_vals, *key):
else:
inner_vals = [(d.name, self.get_dimension(d).values)
for d in inner_kdims]
group = group_type(self.select(**dict(outer_vals+inner_vals)).reindex(inner_kdims))
with item_check(False):
selected = HoloMap(self.select(**dict(outer_vals+inner_vals)))
group = group_type(selected.reindex(inner_kdims))
groups.append((outer, group))
return container_type(groups, kdims=outer_kdims)

Expand Down
2 changes: 2 additions & 0 deletions holoviews/core/util.py
Expand Up @@ -187,6 +187,8 @@ def validate_dynamic_argspec(argspec, kdims, streams):
kdims=kdims))
elif set(kdims).issubset(set(kwargs)): # Key dims can be supplied by keyword
return kdims
elif set(kdims).issubset(set(posargs+kwargs)):
return kdims
else:
raise KeyError('Callback signature over {names} does not accommodate '
'required kdims {kdims}'.format(names=list(set(posargs+kwargs)),
Expand Down

0 comments on commit d5a8d34

Please sign in to comment.