Skip to content

Commit

Permalink
Python3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 16, 2017
1 parent b013fe2 commit afa88e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions holoviews/core/layout.py
Expand Up @@ -103,7 +103,7 @@ def __mul__(self, other, reverse=False):
layer2 = self if reverse else other
adjoined_items = []
if isinstance(layer1, AdjointLayout) and isinstance(layer2, AdjointLayout):
adjoined_items = layer1.data.values()
adjoined_items = list(layer1.data.values())
adjoined_items[0] = layer1.main*layer2.main
too_many = False
if layer1.right is not None and layer2.right is not None:
Expand All @@ -126,10 +126,10 @@ def __mul__(self, other, reverse=False):
"do not match and the AdjointLayout can "
"hold no more than two adjoined plots.")
elif isinstance(layer1, AdjointLayout):
adjoined_items = layer1.data.values()
adjoined_items = list(layer1.data.values())
adjoined_items[0] = layer1.main * layer2
elif isinstance(layer2, AdjointLayout):
adjoined_items = layer2.data.values()
adjoined_items = list(layer2.data.values())
adjoined_items[0] = layer1 * layer2.main

if adjoined_items:
Expand Down
5 changes: 2 additions & 3 deletions holoviews/core/overlay.py
Expand Up @@ -36,9 +36,8 @@ def dynamic_mul(*args, **kwargs):
items = [(k, self * v) for (k, v) in other.items()]
return other.clone(items)
elif isinstance(other, AdjointLayout):
main = ('main', self * other.main)
adjoined_items = other.items()
adjoined_items[0] = main
adjoined_items = list(other.data.values())
adjoined_items[0] = self * other.main
return other.clone(adjoined_items)

return Overlay.from_values([self, other])
Expand Down

0 comments on commit afa88e3

Please sign in to comment.