diff --git a/diffrax/_solution.py b/diffrax/_solution.py index 392c447e..8af6f444 100644 --- a/diffrax/_solution.py +++ b/diffrax/_solution.py @@ -1,7 +1,6 @@ import warnings from typing import Any -import jax import optimistix as optx from jaxtyping import Array, Bool, PyTree, Real, Shaped @@ -50,8 +49,7 @@ def discrete_terminating_event_occurred(self): def is_okay(result: RESULTS) -> Bool[Array, ""]: - with jax.ensure_compile_time_eval(): # for the `|` between two `Bool[Array, ""]`. - return is_successful(result) | is_event(result) + return is_successful(result) | is_event(result) def is_successful(result: RESULTS) -> Bool[Array, ""]: @@ -74,8 +72,7 @@ def update_result(old_result: RESULTS, new_result: RESULTS) -> RESULTS: error_n | error_n error_n error_o """ out_result = RESULTS.where(is_okay(old_result), new_result, old_result) - with jax.ensure_compile_time_eval(): - pred = is_okay(new_result) & is_event(old_result) + pred = is_okay(new_result) & is_event(old_result) return RESULTS.where(pred, old_result, out_result)