rxnfit.numbalsoda_rhs module
Compile SymPy-derived ODE right-hand sides into numbalsoda LSODA kernels.
Generates Numba cfunc callables with the LSODA signature
rhs(t, u, du, p). The parameter layout in p must stay synchronized with
rxnfit.lsoda_p_vector.build_lsoda_parameter_vector_p().
Note
Do not import rxnfit.build_ode from this module; build_ode loads
it lazily to keep the dependency graph acyclic.
- rxnfit.numbalsoda_rhs.compile_numbalsoda_rhs_for_builder(builder: Any, rate_const_values: Any, symbolic_rate_const_keys: Any) Tuple[Any, int] | None
Return
(numba cfunc, n_p)for numbalsoda, orNoneif unavailable.Skips compilation for time-dependent systems (callable
rate_const_valuesortin rate expressions) or when optional deps fail.Note
SymPy 1.13+ no longer registers
lambdify(..., modules="numba"). We usemodules="numpy"then compile withnumba.njit(...)(see SymPytest_issue_20070).