diff --git a/python/sdist/amici/de_export.py b/python/sdist/amici/de_export.py index 12cde4630f..0770894884 100644 --- a/python/sdist/amici/de_export.py +++ b/python/sdist/amici/de_export.py @@ -2724,6 +2724,9 @@ def _collect_heaviside_roots( elif arg.has(sp.Heaviside): root_funs.extend(self._collect_heaviside_roots(arg.args)) + if not root_funs: + return [] + # substitute 'w' expressions into root expressions now, to avoid # rewriting 'root.cpp' and 'stau.cpp' headers # to include 'w.h'