From e49fdcf6484485946633b5f6ece93351a0e01d84 Mon Sep 17 00:00:00 2001 From: zzl Date: Sun, 5 Nov 2023 18:41:12 +0800 Subject: [PATCH] change the order of kwargs --- cyipopt/scipy_interface.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cyipopt/scipy_interface.py b/cyipopt/scipy_interface.py index 15a4646..6204eec 100644 --- a/cyipopt/scipy_interface.py +++ b/cyipopt/scipy_interface.py @@ -373,9 +373,6 @@ def _wrap_funs(fun, jac, hess, hessp, constraints, kwargs): def minimize_ipopt(fun, x0, - mult_g=[], - mult_x_L=[], - mult_x_U=[], args=(), kwargs=None, method=None, @@ -386,7 +383,10 @@ def minimize_ipopt(fun, constraints=(), tol=None, callback=None, - options=None): + options=None, + mult_g=[], + mult_x_L=[], + mult_x_U=[],): """ Minimization using Ipopt with an interface like :py:func:`scipy.optimize.minimize`. @@ -429,16 +429,6 @@ def minimize_ipopt(fun, x0 : array-like, shape(n, ) Initial guess. Array of real elements of shape (n,), where ``n`` is the number of independent variables. - mult_g : list, optional - Initial guess for the Lagrange multipliers of the constraints. A list - of real elements of length ``m``, where ``m`` is the number of - constraints. - mult_x_L : list, optional - Initial guess for the Lagrange multipliers of the lower bounds on the - variables. A list of real elements of length ``n``. - mult_x_U : list, optional - Initial guess for the Lagrange multipliers of the upper bounds on the - variables. A list of real elements of length ``n``. args : tuple, optional Extra arguments passed to the objective function and its derivatives (``fun``, ``jac``, and ``hess``). @@ -489,6 +479,16 @@ def minimize_ipopt(fun, callback : callable, optional This parameter is ignored unless `method` is one of the SciPy methods. + mult_g : list, optional + Initial guess for the Lagrange multipliers of the constraints. A list + of real elements of length ``m``, where ``m`` is the number of + constraints. + mult_x_L : list, optional + Initial guess for the Lagrange multipliers of the lower bounds on the + variables. A list of real elements of length ``n``. + mult_x_U : list, optional + Initial guess for the Lagrange multipliers of the upper bounds on the + variables. A list of real elements of length ``n``. References ----------