Skip to content

Commit 6f1c18b

Browse files
committed
Minor bugfix: default rhobeg value is 0.1 when scaling bounds to [0,1]
1 parent 80c5de7 commit 6f1c18b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dfols/solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ def solve(objfun, x0, args=(), bounds=None, npt=None, rhobeg=None, rhoend=1e-8,
823823
if npt is None:
824824
npt = n + 1
825825
if rhobeg is None:
826-
rhobeg = 0.1 * max(np.max(np.abs(x0)), 1.0)
826+
rhobeg = 0.1 if scaling_within_bounds else 0.1 * max(np.max(np.abs(x0)), 1.0)
827827
if maxfun is None:
828828
maxfun = min(100 * (n + 1), 1000) # 100 gradients, capped at 1000
829829
if nsamples is None:

0 commit comments

Comments
 (0)