Skip to content

Commit

Permalink
Fix Image element bounds check
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 7, 2019
1 parent 63551b1 commit 168372a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion holoviews/element/raster.py
Expand Up @@ -311,8 +311,9 @@ def __init__(self, data, kdims=None, vdims=None, bounds=None, extents=None,
bounds = BoundingBox(points=((l, b), (r, t)))

data_bounds = None
if self.interface is ImageInterface and not isinstance(data, np.ndarray):
if self.interface is ImageInterface and not isinstance(data, (np.ndarray, Image)):
data_bounds = self.bounds.lbrt()

l, b, r, t = bounds.lbrt()
xdensity = xdensity if xdensity else util.compute_density(l, r, dim1, self._time_unit)
ydensity = ydensity if ydensity else util.compute_density(b, t, dim2, self._time_unit)
Expand Down

0 comments on commit 168372a

Please sign in to comment.