From 9057b0dd5b3e5e02bff76b9026e4362a87cb4253 Mon Sep 17 00:00:00 2001 From: Lorenzo Castellino Date: Thu, 6 Jun 2024 11:46:46 +0200 Subject: [PATCH] Avoid printing report by default --- src/libeq/optimizers/potentiometry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libeq/optimizers/potentiometry.py b/src/libeq/optimizers/potentiometry.py index bfab6e5..44f7781 100644 --- a/src/libeq/optimizers/potentiometry.py +++ b/src/libeq/optimizers/potentiometry.py @@ -14,7 +14,7 @@ from .fitter import levenberg_marquardt -def PotentiometryOptimizer(data: SolverData): +def PotentiometryOptimizer(data: SolverData, reporter=None): def f_obj(c): """ Given the concentrations of the components, calculate the objective function value. @@ -81,7 +81,7 @@ def jacobian(concentration): dcdb = np.squeeze(np.linalg.solve(J, -B)) return fhsel(dcdb[..., np.flatnonzero(beta_flags)]).T - def reporter(*args): + def text_reporter(*args): print(f"iteration n.{args[0]}") print("x", args[1]) print("dx", args[2])