Skip to content

Commit

Permalink
Fix Image element bounds check (#4035)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 8, 2019
1 parent 6185407 commit af84327
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion holoviews/element/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,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 af84327

Please sign in to comment.