fix: Combined fit can now handle list and array inputs for y-values, test added.

This commit is contained in:
Fabian Joswig 2022-12-19 16:06:12 +01:00
parent 140b626aae
commit 33ff2219ba
No known key found for this signature in database
2 changed files with 12 additions and 15 deletions

View file

@ -703,12 +703,8 @@ def _combined_fit(x, y, func, silent=False, **kwargs):
jacobian = auto_jacobian
hessian = auto_hessian
x_all = []
y_all = []
for key in x.keys():
y_all += y[key]
x_all = np.concatenate([np.array(o) for o in x.values()])
y_all = np.concatenate([np.array(o) for o in y.values()])
if len(x_all.shape) > 2:
raise Exception('Unknown format for x values')