Skip to content

Commit

Permalink
Improved Path.split when not using multi-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 20, 2017
1 parent 1b2602d commit 0a73811
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions holoviews/element/path.py
Expand Up @@ -104,8 +104,18 @@ def split(self, start=None, end=None, datatype=None, **kwargs):
subpaths of the same type. A start and/or end may be supplied
to select a subset of paths.
"""
if not issubclass(self.interface, MultiInterface):
return [self]
if not self.interface.multi:
if datatype == 'array':
obj = self.array(**kwargs)
elif datatype == 'dataframe':
obj = self.dframe(**kwargs)
elif datatype == 'columns':
obj = self.columns(**kwargs)
elif datatype is None:
obj = self
else:
raise ValueError("%s datatype not support" % datatype)
return [obj]
return self.interface.split(self, start, end, datatype, **kwargs)


Expand Down

0 comments on commit 0a73811

Please sign in to comment.