Skip to content

Commit c25e57b

Browse files
authored
Merge pull request #99 from JPTS2/take_best
Take best only if a solution has not been found
2 parents 769bc4b + 345bbc8 commit c25e57b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xdeps/optimize/optimize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ def step(
10571057
if self._err.last_point_within_tol:
10581058
break
10591059

1060-
if take_best:
1060+
if take_best and not self._err.last_point_within_tol:
10611061
penalty_step = self._log["penalty"][i_log_start:]
10621062
i_best = np.argmin(penalty_step)
10631063
if i_best != len(penalty_step) - 1:

0 commit comments

Comments
 (0)