Skip to content

Commit

Permalink
Use clone
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Aug 15, 2023
1 parent 808f5d7 commit 76a17bb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions holoviews/operation/downsample.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import param

from .resample import ResampleOperation1D
from ..core import NdOverlay, Overlay, Store
from ..core import NdOverlay, Overlay
from ..element.chart import Area


Expand Down Expand Up @@ -169,13 +169,11 @@ class downsample1d(ResampleOperation1D):
def _process(self, element, key=None):
if isinstance(element, (Overlay, NdOverlay)):
_process = partial(self._process, key=key)
_opts = element.opts.get().kwargs if Store._options else {}
if isinstance(element, Overlay):
elements = [v.map(_process) for v in element]
return Overlay(elements).opts(**_opts)
else:
elements = {k: v.map(_process) for k, v in element.items()}
return NdOverlay(elements).opts(**_opts)
return element.clone(elements)

if self.p.x_range:
element = element[slice(*self.p.x_range)]
Expand Down

0 comments on commit 76a17bb

Please sign in to comment.