Skip to content

Commit

Permalink
Removed strict enforcement of regular sampling on Image
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Apr 8, 2017
1 parent c824933 commit a7a6b23
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ def is_nan(x):
return False


def bound_range(vals, density, TOL=10e-9):
def bound_range(vals, density):
"""
Computes a bounding range from a number of evenly spaced samples.
Will raise an error if samples are not evenly spaced within
Expand All @@ -1225,9 +1225,6 @@ def bound_range(vals, density, TOL=10e-9):
invert = True
diff = -diff
if not density:
unit = np.unique(np.round(diff/TOL).astype(int))*TOL
if len(unit) > 1:
raise ValueError('Data is not sampled on a grid.')
density = 1./unit[0]
density = 1./((high-low)/(len(vals)-1))
halfd = 0.5/density
return low-halfd, high+halfd, density, invert

0 comments on commit a7a6b23

Please sign in to comment.