Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Dec 12, 2023
1 parent fd227ec commit fcc36cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/sdist/amici/de_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -2757,11 +2757,12 @@ def _process_heavisides(
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))

# `tmp_new` is None if the root is not time-dependent.
if tmp_new is None:
continue

heavisides.append((sp.Heaviside(tmp_old), tmp_new))

# For Heavisides, we need to add the negative function as well
self._get_unique_root(sp.sympify(-tmp_old), roots)

Expand Down

0 comments on commit fcc36cc

Please sign in to comment.