Skip to content

Commit

Permalink
TST: test fix of out-of-bound evaluations in optimize.minimize, powel…
Browse files Browse the repository at this point in the history
…l method (#13411)

* TST: test fix of out-of-bound evaluations in optimize.minimize, powell method
  • Loading branch information
TianyiQ committed Oct 9, 2022
1 parent 85d25b6 commit 74946d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scipy/optimize/tests/test_optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,15 @@ def fun(x):

optimize.minimize(fun, x0=[0.6, 20], method='Powell', bounds=bounds)

# Another test from the original report - gh-13411
bounds = optimize.Bounds(lb=[0,], ub=[1,], keep_feasible=[True,])

def func(x):
assert x >= 0 and x <= 1
return np.exp(x)

optimize.minimize(fun=func, x0=[0.5], method='powell', bounds=bounds)


class TestRosen:

Expand Down

0 comments on commit 74946d2

Please sign in to comment.