fix: Combined fit can now handle list and array inputs for x-values,

test added.
This commit is contained in:
Fabian Joswig 2022-12-19 15:15:24 +01:00
parent c14d162f7e
commit 140b626aae
No known key found for this signature in database
2 changed files with 17 additions and 2 deletions

View file

@ -706,10 +706,9 @@ def _combined_fit(x, y, func, silent=False, **kwargs):
x_all = []
y_all = []
for key in x.keys():
x_all += x[key]
y_all += y[key]
x_all = np.asarray(x_all)
x_all = np.concatenate([np.array(o) for o in x.values()])
if len(x_all.shape) > 2:
raise Exception('Unknown format for x values')