diff --git a/python/sdist/amici/de_model.py b/python/sdist/amici/de_model.py index 2832814b48..34194a97c7 100644 --- a/python/sdist/amici/de_model.py +++ b/python/sdist/amici/de_model.py @@ -2445,7 +2445,9 @@ def _get_unique_root( return None for root in roots: - if sp.simplify(root_found - root.get_val()).is_zero: + if (difference := (root_found - root.get_val())).is_zero or ( + self._simplify and self._simplify(difference).is_zero + ): return root.get_sym() # create an event for a new root function