Skip to content

Commit

Permalink
DOC: Update example for nelder_mead
Browse files Browse the repository at this point in the history
  • Loading branch information
QBatista committed Dec 26, 2018
1 parent ab0c261 commit 86b9b44
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions quantecon/optimize/nelder_mead.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ def nelder_mead(fun, x0, bounds=np.array([[], []]).T, args=(), tol_f=1e-10,
... return -(100 * (x[1] - x[0] ** 2) ** 2 + (1 - x[0])**2)
...
>>> x0 = np.array([-2, 1])
>>> qe.optimize.maximize(rosenbrock, x0)
results(x=array([0.99999814, 0.99999756]), fun=1.6936258239463265e-10,
success=True, nit=110)
>>> qe.optimize.nelder_mead(rosenbrock, x0)
results(x=array([0.99999814, 0.99999756]), fun=-1.6936258239463265e-10,
success=True, nit=110,
final_simplex=array([[0.99998652, 0.9999727],
[1.00000218, 1.00000301],
[0.99999814, 0.99999756]]))
Notes
--------
Expand Down

0 comments on commit 86b9b44

Please sign in to comment.