fix: corrected bug that prevented combined fits with multiple x-obs in some cases (#241)

* fix: corrected bug that prevented combined fits with multiple x-obs in some cases

* made test more complex

* [Fix] Slightly increase tolerance for matrix function test.

* Adapt test_merge_idx to compare lists

---------

Co-authored-by: Simon Kuberski <simon.kuberski@cern.ch>
Co-authored-by: Fabian Joswig <fjosw@users.noreply.github.com>
This commit is contained in:
s-kuberski 2024-09-14 02:15:59 +09:00 committed by GitHub
parent 1d6f7f65c0
commit 4b1bb0872a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 7 deletions

View file

@ -256,7 +256,7 @@ def least_squares(x, y, func, priors=None, silent=False, **kwargs):
if sorted(list(funcd.keys())) != key_ls:
raise ValueError('x and func dictionaries do not contain the same keys.')
x_all = np.concatenate([np.array(xd[key]) for key in key_ls])
x_all = np.concatenate([np.array(xd[key]).transpose() for key in key_ls]).transpose()
y_all = np.concatenate([np.array(yd[key]) for key in key_ls])
y_f = [o.value for o in y_all]