From 250202e0b600fb5892e144fb2352fc1e2f71c840 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Wed, 4 Oct 2023 10:56:51 +0300 Subject: [PATCH] fix: do not set tfinal to inf --- pyshocks/timestepping.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyshocks/timestepping.py b/pyshocks/timestepping.py index eda3bf1..35717fb 100644 --- a/pyshocks/timestepping.py +++ b/pyshocks/timestepping.py @@ -106,7 +106,8 @@ def step( :returns: a :class:`StepCompleted` at the end of each taken time step. """ if tfinal is None: - tfinal = jnp.inf + # NOTE: can't set this to jnp.inf because we have a debug check for it + tfinal = jnp.finfo(u0.dtype).max m = 0 t = jnp.array(tstart, dtype=u0.dtype)