From ef7c099e306854686ed71e1aacb48add08bb412c Mon Sep 17 00:00:00 2001 From: Ipuch Date: Wed, 10 Nov 2021 16:59:51 -0500 Subject: [PATCH] cleaning as_dict for Ipopt Options --- bioptim/interfaces/SolverOptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bioptim/interfaces/SolverOptions.py b/bioptim/interfaces/SolverOptions.py index d85a68998..b40d8f99d 100644 --- a/bioptim/interfaces/SolverOptions.py +++ b/bioptim/interfaces/SolverOptions.py @@ -368,8 +368,9 @@ def set_initialization_options(self, val: float): def as_dict(self, solver): solver_options = self.__dict__ options = {} + non_python_options = ["_c_compile", "type", "show_online_optim", "show_options"] for key in solver_options: - if key != "_c_compile" and key != "type" and key != "show_online_optim" and key != "show_options": + if key not in non_python_options: ipopt_key = "ipopt." + key[1:] options[ipopt_key] = solver_options[key] return {**options, **solver.options_common}