Skip to content

Commit

Permalink
Fixed Contours dimension initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 8, 2017
1 parent 0c85b2c commit 936f000
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions holoviews/element/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def __init__(self, data, kdims=None, vdims=None, **params):
data = [np.column_stack(path) for path in data]
super(Path, self).__init__(data, kdims=kdims, vdims=vdims, **params)


def __setstate__(self, state):
"""
Ensures old-style unpickled Path types without an interface
Expand Down Expand Up @@ -132,7 +131,9 @@ def __init__(self, data, kdims=None, vdims=None, **params):
if params.get('level') is not None:
vdims = vdims or [self._level_vdim]
params['vdims'] = []
super(Contours, self).__init__(data, **params)
else:
params['vdims'] = vdims
super(Contours, self).__init__(data, kdims=kdims, **params)
if params.get('level') is not None:
self.vdims = [d if isinstance(d, Dimension) else Dimension(d)
for d in vdims]
Expand Down

0 comments on commit 936f000

Please sign in to comment.