mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
fix: Exception types for fit function detection specified.
This commit is contained in:
parent
3e29cf9ca8
commit
fe9696841f
1 changed files with 3 additions and 3 deletions
|
@ -180,7 +180,7 @@ def total_least_squares(x, y, func, silent=False, **kwargs):
|
|||
for i in range(42):
|
||||
try:
|
||||
func(np.arange(i), x.T[0])
|
||||
except Exception:
|
||||
except (IndexError, TypeError) as e:
|
||||
continue
|
||||
else:
|
||||
break
|
||||
|
@ -322,7 +322,7 @@ def _prior_fit(x, y, func, priors, silent=False, **kwargs):
|
|||
for i in range(100):
|
||||
try:
|
||||
func(np.arange(i), 0)
|
||||
except Exception:
|
||||
except (IndexError, TypeError) as e:
|
||||
continue
|
||||
else:
|
||||
break
|
||||
|
@ -449,7 +449,7 @@ def _standard_fit(x, y, func, silent=False, **kwargs):
|
|||
for i in range(42):
|
||||
try:
|
||||
func(np.arange(i), x.T[0])
|
||||
except Exception:
|
||||
except (IndexError, TypeError) as e:
|
||||
continue
|
||||
else:
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue