From d8557668eb0acc77254f8df6550385d7e121fd8e Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 26 Feb 2024 23:03:26 +0100 Subject: [PATCH] .. --- python/sdist/amici/de_export.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/python/sdist/amici/de_export.py b/python/sdist/amici/de_export.py index cf36fa441f..53d59ad4e9 100644 --- a/python/sdist/amici/de_export.py +++ b/python/sdist/amici/de_export.py @@ -1562,8 +1562,8 @@ def static_indices(self, name: str) -> list[int]: return res if name == "w": - dwdx = self.eq("dwdx") - dwdw = self.eq("dwdw") + dwdx = self.sym("dwdx") + dwdw = self.sym("dwdw") w = self.eq("w") # Check for direct (via `t`) or indirect (via `x`, `h`, or splines) @@ -1662,8 +1662,12 @@ def static_indices(self, name: str) -> list[int]: # splines: non-static not self._splines or "AmiciSpline" not in str(expr) ) - and all( - expr.diff(dyn_sym).is_zero for dyn_sym in dynamic_syms + and ( + not expr.has(dynamic_syms) + or all( + expr.diff(dyn_sym).is_zero + for dyn_sym in dynamic_syms + ) ) ) ]