diff --git a/python/sdist/amici/de_export.py b/python/sdist/amici/de_export.py index 2943b000d3..a4328a610e 100644 --- a/python/sdist/amici/de_export.py +++ b/python/sdist/amici/de_export.py @@ -2754,7 +2754,7 @@ def _process_heavisides( heavisides = [] # run through the expression tree and get the roots tmp_roots_old = self._collect_heaviside_roots(dt_expanded.args) - for tmp_old in tmp_roots_old: + for tmp_old in set(tmp_roots_old): # we want unique identifiers for the roots tmp_new = self._get_unique_root(tmp_old, roots) heavisides.append((sp.Heaviside(tmp_old), tmp_new))