Skip to content

Commit

Permalink
BUG: Cannot just set tol=np.inf if None because that doesn't fit in t…
Browse files Browse the repository at this point in the history
…he timedelta64 format.
  • Loading branch information
mpu-creare committed Jul 31, 2019
1 parent 536a334 commit 60fce91
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions podpac/core/data/interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,9 @@ def _loop_helper(
tol = self.time_tolerance
else:
tol = self.spatial_tolerance
if tol is None:
tol = np.inf

diff = np.abs(source_data.coords[dim].values - i.values)
if diff <= tol:
if tol == None or diff <= tol:
src_i = (diff).argmin()
src_idx = {dim: source_data.coords[dim][src_i]}
else:
Expand Down

0 comments on commit 60fce91

Please sign in to comment.