@@ -613,16 +613,16 @@ are also supported by L-BFGS-B::
613613 >>> def jacobian(x):
614614 ... return np.array((-2*.5*(1 - x[0]) - 4*x[0]*(x[1] - x[0]**2), 2*(x[1] - x[0]**2)))
615615 >>> sp.optimize.minimize(f, [2, 2], method="L-BFGS-B", jac=jacobian)
616- message: CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL
617- success: True
618- status: 0
619- fun: 1.4417677473...e-15
620- x: [ 1.000e+00 1.000e+00]
621- nit: 16
622- jac: [ 1.023e-07 -2.593e-08]
623- nfev: 17
624- njev: 17
625- hess_inv: <2x2 LbfgsInvHessProduct with dtype=float64>
616+ message: CONVERGENCE: NORM OF PROJECTED GRADIENT <= PGTOL
617+ success: True
618+ status: 0
619+ fun: 1.4417677473...e-15
620+ x: [ 1.000e+00 1.000e+00]
621+ nit: 16
622+ jac: [ 1.023e-07 -2.593e-08]
623+ nfev: 17
624+ njev: 17
625+ hess_inv: <2x2 LbfgsInvHessProduct with dtype=float64>
626626
627627Gradient-less methods
628628----------------------
@@ -886,12 +886,11 @@ Lets try to minimize the norm of the following vectorial function::
886886
887887 >>> x0 = np.zeros(10)
888888 >>> sp.optimize.leastsq(f, x0)
889- (array([0. , 0.11111111, 0.22222222, 0.33333333, 0.44444444,
890- 0.55555556, 0.66666667, 0.77777778, 0.88888889, 1. ]), 2 )
889+ (array([0. , 0.11111111, 0.22222222, 0.33333333, 0.44444444,
890+ 0.55555556, 0.66666667, 0.77777778, 0.88888889, 1. ]), ... )
891891
892- This took 67 function evaluations (check it with 'full_output=1'). What
893- if we compute the norm ourselves and use a good generic optimizer
894- (BFGS)::
892+ This took 67 function evaluations (check it with 'full_output=True'). What
893+ if we compute the norm ourselves and use a good generic optimizer (BFGS)::
895894
896895 >>> def g(x):
897896 ... return np.sum(f(x)**2)
@@ -958,7 +957,7 @@ support bound constraints with the parameter ``bounds``::
958957 >>> def f(x):
959958 ... return np.sqrt((x[0] - 3)**2 + (x[1] - 2)**2)
960959 >>> sp.optimize.minimize(f, np.array([0, 0]), bounds=((-1.5, 1.5), (-1.5, 1.5)))
961- message: CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL
960+ message: CONVERGENCE: NORM OF PROJECTED GRADIENT <= PGTOL
962961 success: True
963962 status: 0
964963 fun: 1.5811388300841898
@@ -967,7 +966,7 @@ support bound constraints with the parameter ``bounds``::
967966 jac: [-9.487e-01 -3.162e-01]
968967 nfev: 9
969968 njev: 3
970- hess_inv: <2x2 LbfgsInvHessProduct with dtype=float64>
969+ hess_inv: <2x2 LbfgsInvHessProduct with dtype=float64>
971970
972971.. image :: auto_examples/images/sphx_glr_plot_constraints_002.png
973972 :target: auto_examples/plot_constraints.html
0 commit comments