Skip to content

Commit

Permalink
perf: Handle unique roots only
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Dec 12, 2023
1 parent e0fbeec commit fd227ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/sdist/amici/de_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Check warning on line 2760 in python/sdist/amici/de_export.py

View check run for this annotation

Codecov / codecov/patch

python/sdist/amici/de_export.py#L2760

Added line #L2760 was not covered by tests
Expand Down

0 comments on commit fd227ec

Please sign in to comment.