bundles / scipy latest / scipy / optimize / _constraints / PreparedConstraint
class
scipy.optimize._constraints:PreparedConstraint
Signature
class PreparedConstraint ( constraint , x0 , sparse_jacobian = None , finite_diff_bounds = (-inf, inf) ) Members
Summary
Constraint prepared from a user defined constraint.
Extended Summary
On creation it will check whether a constraint definition is valid and the initial point is feasible. If created successfully, it will contain the attributes listed below.
Parameters
constraint: {NonlinearConstraint, LinearConstraint`, Bounds}Constraint to check and prepare.
x0: array_likeInitial vector of independent variables.
sparse_jacobian: bool or None, optionalIf bool, then the Jacobian of the constraint will be converted to the corresponded format if necessary. If None (default), such conversion is not made.
finite_diff_bounds: 2-tuple, optionalLower and upper bounds on the independent variables for the finite difference approximation, if applicable. Defaults to no bounds.
Attributes
fun: {VectorFunction, LinearVectorFunction, IdentityVectorFunction}Function defining the constraint wrapped by one of the convenience classes.
bounds: 2-tupleContains lower and upper bounds for the constraints --- lb and ub. These are converted to ndarray and have a size equal to the number of the constraints.
keep_feasible: ndarrayArray indicating which components must be kept feasible with a size equal to the number of the constraints.
Aliases
-
scipy.optimize._constraints.PreparedConstraint