bundles / scipy 1.17.1 / scipy / optimize / _constraints / Bounds
class
scipy.optimize._constraints:Bounds
Signature
class Bounds ( lb = -inf , ub = inf , keep_feasible = False ) Members
Summary
Bounds constraint on the variables.
Extended Summary
The constraint has the general inequality form
lb <= x <= ubIt is possible to use equal bounds to represent an equality constraint or infinite bounds to represent a one-sided constraint.
Parameters
lb, ub: dense array_like, optionalLower and upper bounds on independent variables.
lb,ub, andkeep_feasiblemust be the same shape or broadcastable. Set components oflbandubequal to fix a variable. Usenp.infwith an appropriate sign to disable bounds on all or some variables. Note that you can mix constraints of different types: interval, one-sided or equality, by setting different components oflbandubas necessary. Defaults tolb = -np.infandub = np.inf(no bounds).keep_feasible: dense array_like of bool, optionalWhether to keep the constraint components feasible throughout iterations. Must be broadcastable with
lbandub. Default is False. Has no effect for equality constraints.
Aliases
-
scipy.optimize.Bounds