Skip to content

Commit 305999d

Browse files
author
Malcolm White
committed
DEBUG:: Check for np.inf values when transferring travel times.
1 parent bb4d2ac commit 305999d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pykonal/pykonal.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ class EikonalSolver(object):
268268
):
269269
idx = tuple(idx)
270270
u = uui(pgrid_new[idx])
271-
if not np.isnan(u):
271+
# The np.isinf(u) check is a hack.
272+
# The interpolator should never return np.inf.
273+
if not np.isnan(u) and not np.isinf(u):
272274
self.uu[idx] = u
273275
self.is_far[idx] = False
274276
self.is_alive[idx] = set_alive

0 commit comments

Comments
 (0)