diff --git a/python/sdist/amici/de_export.py b/python/sdist/amici/de_export.py index 6218642dd1..cf36fa441f 100644 --- a/python/sdist/amici/de_export.py +++ b/python/sdist/amici/de_export.py @@ -1662,8 +1662,8 @@ def static_indices(self, name: str) -> list[int]: # splines: non-static not self._splines or "AmiciSpline" not in str(expr) ) - and smart_is_zero_matrix( - smart_jacobian(sp.Matrix([expr]), dynamic_syms) + and all( + expr.diff(dyn_sym).is_zero for dyn_sym in dynamic_syms ) ) ]