From 068641012c2c395fb891e5d056caadd7743486e8 Mon Sep 17 00:00:00 2001 From: MarkusZimmerDLR <77002394+MarkusZimmerDLR@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:56:14 +0100 Subject: [PATCH 1/2] Fix #239 --- cyipopt/scipy_interface.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cyipopt/scipy_interface.py b/cyipopt/scipy_interface.py index 238a4e6..dd1d334 100644 --- a/cyipopt/scipy_interface.py +++ b/cyipopt/scipy_interface.py @@ -596,10 +596,8 @@ def minimize_ipopt(fun, # Rename some default scipy options replace_option(options, b'disp', b'print_level') replace_option(options, b'maxiter', b'max_iter') - if getattr(options, 'print_level', False) is True: - options[b'print_level'] = 1 - else: - options[b'print_level'] = 0 + options[b'print_level'] = int(options.get(b'print_level', 5)) + if b'tol' not in options: options[b'tol'] = tol or 1e-8 if b'mu_strategy' not in options: From 0a971ab620e6e75694e780707054d42d500415c3 Mon Sep 17 00:00:00 2001 From: MarkusZimmerDLR <77002394+MarkusZimmerDLR@users.noreply.github.com> Date: Wed, 29 Nov 2023 15:27:24 +0100 Subject: [PATCH 2/2] updated default of print_level from 5 to 0 --- cyipopt/scipy_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyipopt/scipy_interface.py b/cyipopt/scipy_interface.py index dd1d334..95c8551 100644 --- a/cyipopt/scipy_interface.py +++ b/cyipopt/scipy_interface.py @@ -596,7 +596,7 @@ def minimize_ipopt(fun, # Rename some default scipy options replace_option(options, b'disp', b'print_level') replace_option(options, b'maxiter', b'max_iter') - options[b'print_level'] = int(options.get(b'print_level', 5)) + options[b'print_level'] = int(options.get(b'print_level', 0)) if b'tol' not in options: options[b'tol'] = tol or 1e-8