Skip to content

Commit

Permalink
Ensure empty Image is actually zero sized
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jul 12, 2018
1 parent 3e30a85 commit 6239007
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion holoviews/element/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ 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((2, 2))
data = np.zeros((0, 0))
if not xdensity: xdensity = 1
if not ydensity: ydensity = 1

if rtol is not None:
params['rtol'] = rtol
else:
Expand Down

0 comments on commit 6239007

Please sign in to comment.