Skip to content

Commit

Permalink
Set default bounds for empty Image
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 15, 2018
1 parent 22e3235 commit 94fdd67
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 @@ -248,7 +248,8 @@ def __init__(self, data, kdims=None, vdims=None, bounds=None, extents=None,
if (data is None
or (isinstance(data, (list, tuple)) and not data)
or (isinstance(data, np.ndarray) and data.size == 0)):
data = np.zeros((0, 0))
data = data if isinstance(data, np.ndarray) else np.zeros((0, 0))
bounds = 0
if not xdensity: xdensity = 1
if not ydensity: ydensity = 1

Expand Down

0 comments on commit 94fdd67

Please sign in to comment.