Skip to content

Commit 2cbc36c

Browse files
committed
Suppress FutureWarning in trajectory calculation to avoid cluttering output (see see patrick-kidger/diffrax#445)
1 parent 0e1d92a commit 2cbc36c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

essos/dynamics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ def update_state(state, _):
237237
_, trajectory = lax.scan(update_state, initial_condition, jnp.arange(len(self.times)-1))
238238
trajectory = jnp.vstack([initial_condition, trajectory])
239239
else:
240+
import warnings
241+
warnings.simplefilter("ignore", category=FutureWarning) # see https://github.com/patrick-kidger/diffrax/issues/445 for explanation
240242
trajectory = diffeqsolve(
241243
self.ODE_term,
242244
t0=0.0,

0 commit comments

Comments
 (0)