minimize(method=’SLSQP’)#

scipy.optimize.minimize(fun, x0, args=(), method=None, jac=None, hess=None, hessp=None, bounds=None, constraints=(), tol=None, callback=None, options=None)

Minimize a scalar function of one or more variables using Sequential Least Squares Programming (SLSQP).

See also

For documentation for the rest of the parameters, see scipy.optimize.minimize

Options:
——-
ftolfloat

Precision target for the value of f in the stopping criterion. This value controls the final accuracy for checking various optimality conditions; gradient of the lagrangian and absolute sum of the constraint violations should be lower than ftol. Similarly, if computed step size and the objective function chage are checked against this value. Default is 1e-6.

epsfloat

Step size used for numerical approximation of the Jacobian.

dispbool

Set to True to print convergence messages. If False, verbosity is ignored and set to 0.

maxiterint

Maximum number of iterations.

finite_diff_rel_stepNone or array_like, optional

If jac in ['2-point', '3-point', 'cs'] the relative step size to use for numerical approximation of jac. The absolute step size is computed as h = rel_step * sign(x) * max(1, abs(x)), possibly adjusted to fit into the bounds. For method='3-point' the sign of h is ignored. If None (default) then step is selected automatically.

workersint, map-like callable, optional

A map-like callable, such as multiprocessing.Pool.map for evaluating any numerical differentiation in parallel. This evaluation is carried out as workers(fun, iterable).

Added in version 1.16.0.