DiffraxSolver

experimental.network_dynamics.solvers.DiffraxSolver(
    solver,
    saveat=None,
    stepsize_controller=None,
    max_steps=4096,
    **kwargs,
)

Wrapper for Diffrax solvers with advanced features.

This class forwards the most commonly used diffeqsolve parameters explicitly and allows access to all other parameters via **kwargs.

Important Notes: - When max_steps is specified, Diffrax may pad solution arrays (ts, ys) with inf values beyond the actual integration steps taken. - Users should filter finite values in post-processing if needed:

  >>> finite_mask = jnp.isfinite(solution.ts)
  >>> ts_filtered = solution.ts[finite_mask]
  >>> ys_filtered = solution.ys[finite_mask]

- To avoid inf-padding, explicitly specify saveat with exact time points:

  >>> solver = DiffraxSolver(
  ...     solver=diffrax.Euler(),
  ...     saveat=diffrax.SaveAt(ts=jnp.linspace(0, 100, 1000))
  ... )