feat: additional check for invalid input to least_squares added.

Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
This commit is contained in:
Fabian Joswig 2023-02-02 14:58:35 +00:00
parent 59d22fceee
commit 088f4d1239
No known key found for this signature in database

View file

@ -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)