From 60fce91a2afe10d82a0c7b6f1996162324a15974 Mon Sep 17 00:00:00 2001 From: Matt Ueckermann Date: Wed, 31 Jul 2019 15:28:45 -0400 Subject: [PATCH] BUG: Cannot just set tol=np.inf if None because that doesn't fit in the timedelta64 format. --- podpac/core/data/interpolator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/podpac/core/data/interpolator.py b/podpac/core/data/interpolator.py index 48d639fff..c9052bc66 100644 --- a/podpac/core/data/interpolator.py +++ b/podpac/core/data/interpolator.py @@ -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: