From 8bc7d18e00344cdaecbae0936fca3b6edd7129d8 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Wed, 16 Oct 2024 15:29:37 +0200 Subject: [PATCH] Only enable sympy if DERIVATIVE block exists --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 89c2813f2..b63b7b0c7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -517,13 +517,15 @@ int run_nmodl(int argc, const char* argv[]) { enable_sympy(solver_exists(*ast, "derivimplicit"), "'SOLVE ... METHOD derivimplicit'"); enable_sympy(node_exists(*ast, ast::AstNodeType::LINEAR_BLOCK), "'LINEAR' block"); + enable_sympy(node_exists(*ast, ast::AstNodeType::DERIVATIVE_BLOCK), + "'DERIVATIVE' block"); enable_sympy(node_exists(*ast, ast::AstNodeType::NON_LINEAR_BLOCK), "'NONLINEAR' block"); enable_sympy(solver_exists(*ast, "sparse"), "'SOLVE ... METHOD sparse'"); } - if (sympy_conductance || sympy_analytic || neuron_code) { + if (sympy_conductance || sympy_analytic) { nmodl::pybind_wrappers::EmbeddedPythonLoader::get_instance() .api() .initialize_interpreter();