Skip to content

Commit 529c0a8

Browse files
Merge pull request #208 from ISISComputingGroup/fix_nightly
fix nightly by using np.min/max not builtin
2 parents c1a2cee + d13756d commit 529c0a8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ibex_bluesky_core/fitting.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def guess(
318318
"center": lmfit.Parameter("center", peak),
319319
"amp": lmfit.Parameter("amp", np.max(y)),
320320
"freq": lmfit.Parameter("freq", np.pi / np.abs(peak - valley)),
321-
"width": lmfit.Parameter("width", max(x) - min(x)),
321+
"width": lmfit.Parameter("width", np.max(x) - np.min(x)),
322322
}
323323

324324
return init_guess
@@ -429,8 +429,8 @@ def guess(
429429
) -> dict[str, lmfit.Parameter]:
430430
init_guess = {
431431
"cen": lmfit.Parameter("cen", np.mean(x)),
432-
"stretch": lmfit.Parameter("stretch", (max(x) - min(x)) / 2),
433-
"scale": lmfit.Parameter("scale", (max(y) - min(y)) / 2),
432+
"stretch": lmfit.Parameter("stretch", (np.max(x) - np.min(x)) / 2),
433+
"scale": lmfit.Parameter("scale", (np.max(y) - np.min(y)) / 2),
434434
"background": lmfit.Parameter("background", np.mean(y)),
435435
}
436436

@@ -466,8 +466,8 @@ def guess(
466466
) -> dict[str, lmfit.Parameter]:
467467
init_guess = {
468468
"cen": lmfit.Parameter("cen", np.mean(x)),
469-
"stretch": lmfit.Parameter("stretch", (max(x) - min(x)) / 2),
470-
"scale": lmfit.Parameter("scale", (max(y) - min(y)) / 2),
469+
"stretch": lmfit.Parameter("stretch", (np.max(x) - np.min(x)) / 2),
470+
"scale": lmfit.Parameter("scale", (np.max(y) - np.min(y)) / 2),
471471
"background": lmfit.Parameter("background", np.min(y)),
472472
}
473473

0 commit comments

Comments
 (0)