Skip to content

Commit

Permalink
fix: do not set tfinal to inf
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Oct 4, 2023
1 parent b410658 commit 250202e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyshocks/timestepping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 250202e

Please sign in to comment.