Skip to content

Commit

Permalink
Merge pull request #1349 from ioam/mul_select_fix
Browse files Browse the repository at this point in the history
Small fixes for dynamic select
  • Loading branch information
jlstevens authored Apr 22, 2017
2 parents e9bb0b8 + 871e242 commit 445d4f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion holoviews/core/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,10 @@ def select(self, selection_specs=None, **selection):
supplied, which will ensure the selection is only applied if the
specs match the selected object.
"""
if selection_specs and not any(self.matches(sp) for sp in selection_specs):
selection = {dim: sel for dim, sel in selection.items()
if dim in self.dimensions()+['selection_mask']}
if (selection_specs and not any(self.matches(sp) for sp in selection_specs)
or not selection):
return self

data = self.interface.select(self, **selection)
Expand Down
4 changes: 2 additions & 2 deletions holoviews/core/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ def dynamic_mul(*key, **kwargs):
key_map = {d.name: k for d, k in zip(dimensions, key)}
layers = []
try:
self_el = self.select(**key_map) if self.kdims else self[()]
self_el = self.select(HoloMap, **key_map) if self.kdims else self[()]
layers.append(self_el)
except KeyError:
pass
try:
other_el = other.select(**key_map) if other.kdims else other[()]
other_el = other.select(HoloMap, **key_map) if other.kdims else other[()]
layers.append(other_el)
except KeyError:
pass
Expand Down

0 comments on commit 445d4f3

Please sign in to comment.