summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-07-19 16:30:01 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-07-19 16:30:01 +0200
commit06aba57eba8abbd761e35af81fa900e2fcf5167f (patch)
tree4eeb45f7204557ecc41044384436acc922292bc2
parent26d1aca811534e5c1673e01cc5eee47696bf7426 (diff)
_try_fits: roofline: ensure that x0 is within bounds
-rw-r--r--lib/paramfit.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/paramfit.py b/lib/paramfit.py
index 44ff0a6..05ffb86 100644
--- a/lib/paramfit.py
+++ b/lib/paramfit.py
@@ -214,6 +214,7 @@ def _try_fits(
(-np.inf, -np.inf, np.min(X)),
(np.inf, np.inf, np.max(X)),
)
+ ini[2] = np.mean(X)
try:
res = optimize.least_squares(
error_function,