Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Feb 26, 2024
1 parent ebafbfb commit e58a09e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions python/sdist/amici/de_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -1663,11 +1663,15 @@ def static_indices(self, name: str) -> list[int]:
not self._splines or "AmiciSpline" not in str(expr)
)
and (
# If the expression contains dynamic symbols, it might
# still be static. However, checking the derivative
# is currently too expensive, and we rather accept
# false negatives.
not expr.has(*dynamic_syms)
or all(
expr.diff(dyn_sym).is_zero
for dyn_sym in dynamic_syms
)
# or all(
# expr.diff(dyn_sym).is_zero
# for dyn_sym in dynamic_syms
# )
)
)
]
Expand Down

0 comments on commit e58a09e

Please sign in to comment.