From 088f4d1239634100bff63b87af5ae0db712696fa Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 2 Feb 2023 14:58:35 +0000 Subject: [PATCH] feat: additional check for invalid input to least_squares added. Co-authored-by: Simon Kuberski --- pyerrors/fits.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyerrors/fits.py b/pyerrors/fits.py index 4a2680f4..e51df9c9 100644 --- a/pyerrors/fits.py +++ b/pyerrors/fits.py @@ -164,7 +164,8 @@ def least_squares(x, y, func, priors=None, silent=False, **kwargs): elif (type(x) == dict and type(y) == dict and type(func) == dict): return _combined_fit(x, y, func, silent=silent, **kwargs) - + elif (type(x) == dict or type(y) == dict or type(func) == dict): + raise TypeError("All arguments have to be dictionaries in order to perform a combined fit.") else: return _standard_fit(x, y, func, silent=silent, **kwargs)