fix: multi dim fits fixed in least squares. Test added. (#160)

Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
This commit is contained in:
Fabian Joswig 2023-03-03 16:35:26 +00:00 committed by GitHub
parent cb289a55ec
commit 82cd2f11ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -554,7 +554,7 @@ def _combined_fit(x, y, func, silent=False, **kwargs):
for key in key_ls:
if not callable(funcd[key]):
raise TypeError('func (key=' + key + ') is not a function.')
if len(xd[key]) != len(yd[key]):
if np.asarray(xd[key]).shape[-1] != len(yd[key]):
raise Exception('x and y input (key=' + key + ') do not have the same length')
for i in range(100):
try: