refactor: Unused variable in fit function detection removed.

This commit is contained in:
Fabian Joswig 2022-06-24 13:12:53 +01:00
parent fe9696841f
commit 86a45eb47b

View file

@ -180,7 +180,9 @@ def total_least_squares(x, y, func, silent=False, **kwargs):
for i in range(42):
try:
func(np.arange(i), x.T[0])
except (IndexError, TypeError) as e:
except TypeError:
continue
except IndexError:
continue
else:
break
@ -322,7 +324,9 @@ def _prior_fit(x, y, func, priors, silent=False, **kwargs):
for i in range(100):
try:
func(np.arange(i), 0)
except (IndexError, TypeError) as e:
except TypeError:
continue
except IndexError:
continue
else:
break
@ -449,7 +453,9 @@ def _standard_fit(x, y, func, silent=False, **kwargs):
for i in range(42):
try:
func(np.arange(i), x.T[0])
except (IndexError, TypeError) as e:
except TypeError:
continue
except IndexError:
continue
else:
break