fix: bug in error propagation for correlated fits fixed.

This commit is contained in:
Fabian Joswig 2022-06-06 15:47:41 +01:00
parent c9e0c6e208
commit 155c329921

View file

@ -559,7 +559,10 @@ def _standard_fit(x, y, func, silent=False, **kwargs):
fitp = fit_result.x fitp = fit_result.x
try: try:
hess = jacobian(jacobian(chisqfunc))(fitp) if kwargs.get('correlated_fit') is True:
hess = jacobian(jacobian(chisqfunc_corr))(fitp)
else:
hess = jacobian(jacobian(chisqfunc))(fitp)
except TypeError: except TypeError:
raise Exception("It is required to use autograd.numpy instead of numpy within fit functions, see the documentation for details.") from None raise Exception("It is required to use autograd.numpy instead of numpy within fit functions, see the documentation for details.") from None