Skip to content

Commit

Permalink
Losened Image sampling validation
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Dec 21, 2017
1 parent 58676fb commit ee012a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions holoviews/element/raster.py
Expand Up @@ -263,13 +263,13 @@ def __init__(self, data, kdims=None, vdims=None, bounds=None, extents=None,
% (self.shape, len(self.vdims)))

xvals = np.unique(np.diff(self.dimension_values(0, expanded=False)))
if len(xvals) > 1 and np.abs(xvals.min()-xvals.max()) > sys.float_info.epsilon*10:
if len(xvals) > 1 and np.abs(xvals.min()-xvals.max()) > sys.float_info.epsilon*100:
raise ValueError("%s dimension %s is not evenly sampled, "
"please use the QuadMesh element for "
"unevenly or irregularly sampled data." %
(type(self).__name__, self.get_dimension(0)))
yvals = np.unique(np.diff(self.dimension_values(1, expanded=False)))
if len(yvals) > 1 and np.abs(yvals.min()-yvals.max()) > sys.float_info.epsilon*10:
if len(yvals) > 1 and np.abs(yvals.min()-yvals.max()) > sys.float_info.epsilon*100:
raise ValueError("%s dimension %s is not evenly sampled, "
"please use the QuadMesh element for "
"unevenly or irregularly sampled data." %
Expand Down

0 comments on commit ee012a1

Please sign in to comment.