Skip to content

Commit

Permalink
Update pypop7/optimizers/ds/powell.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Evolutionary-Intelligence committed Jul 3, 2024
1 parent 51e7e88 commit 889ca38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pypop7/optimizers/ds/powell.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ def _line_for_search(x0, alpha, lb, ub):
# this is adopted from https://github.com/scipy/scipy/blob/main/scipy/optimize/_optimize.py
nonzero, = alpha.nonzero()
if len(nonzero) == 0:
return (0, 0)

return 0, 0
lb, ub = lb[nonzero], ub[nonzero]
x0, alpha = x0[nonzero], alpha[nonzero]
low, high = (lb - x0)/alpha, (ub - x0)/alpha
Expand Down

0 comments on commit 889ca38

Please sign in to comment.