From d64c723c2305aede07fcf5159caa8eba0e526d64 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Mon, 24 Jan 2022 13:22:35 +0000 Subject: [PATCH] feat: stdout of fit routines improved --- pyerrors/fits.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyerrors/fits.py b/pyerrors/fits.py index cad4c0d8..2ae45e37 100644 --- a/pyerrors/fits.py +++ b/pyerrors/fits.py @@ -198,9 +198,9 @@ def total_least_squares(x, y, func, silent=False, **kwargs): n_parms = i if not silent: - print('Fit with', n_parms, 'parameters') + print('Fit with', n_parms, 'parameter' + 's' * (n_parms > 1)) if(len(const_par) > 0): - print('\t and %d constrained parameter%s' % (len(const_par), 's' if len(const_par) > 1 else ''), const_par) + print('and %d constrained parameter%s' % (len(const_par), 's' if len(const_par) > 1 else ''), const_par) x_f = np.vectorize(lambda o: o.value)(x) dx_f = np.vectorize(lambda o: o.dvalue)(x) @@ -362,7 +362,7 @@ def _prior_fit(x, y, func, priors, silent=False, **kwargs): output.priors = loc_priors if not silent: - print('Fit with', n_parms, 'parameters') + print('Fit with', n_parms, 'parameter' + 's' * (n_parms > 1)) y_f = [o.value for o in y] dy_f = [o.dvalue for o in y] @@ -482,9 +482,9 @@ def _standard_fit(x, y, func, silent=False, **kwargs): n_parms = i if not silent: - print('Fit with', n_parms, 'parameters') + print('Fit with', n_parms, 'parameter' + 's' * (n_parms > 1)) if(len(const_par) > 0): - print('\t and %d constrained parameter%s' % (len(const_par), 's' if len(const_par) > 1 else ''), const_par) + print('and %d constrained parameter%s' % (len(const_par), 's' if len(const_par) > 1 else ''), const_par) y_f = [o.value for o in y] dy_f = [o.dvalue for o in y]