From f2cae53eb38005551c29540cca7826b39db9fce9 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 17 Nov 2025 13:27:28 +0100 Subject: [PATCH] Fix generate_sensitivity_code=False for event sensitivity functions With `generate_sensitivity_code=False`, amici still generated some unnecessary event sensivity functions. This is fixed here. --- python/sdist/amici/exporters/sundials/cxx_functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sdist/amici/exporters/sundials/cxx_functions.py b/python/sdist/amici/exporters/sundials/cxx_functions.py index df5de58c5d..ae9eb7013d 100644 --- a/python/sdist/amici/exporters/sundials/cxx_functions.py +++ b/python/sdist/amici/exporters/sundials/cxx_functions.py @@ -434,7 +434,7 @@ def var_in_signature(self, varname: str, ode: bool = True) -> bool: func_name for func_name, func_info in functions.items() if "const int ip" in func_info.arguments() -] +] + ["deltaxB", "dzdx", "drzdx"] #: list of sparse sensitivity functions sparse_sensi_functions = [ @@ -454,6 +454,7 @@ def var_in_signature(self, varname: str, ode: bool = True) -> bool: ] #: list of event sensitivity functions +# (really only those that take `ie` and `ip` as arguments) event_sensi_functions = [ func_name for func_name, func_info in functions.items()