scipy 1.8.0 Pypi GitHub Homepage
Other Docs
AttributesParametersBackRef

Attributes

fun : {VectorFunction, LinearVectorFunction, IdentityVectorFunction}

Function defining the constraint wrapped by one of the convenience classes.

bounds : 2-tuple

Contains 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 : ndarray

Array indicating which components must be kept feasible with a size equal to the number of the constraints.

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_like

Initial vector of independent variables.

sparse_jacobian : bool or None, optional

If 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, optional

Lower and upper bounds on the independent variables for the finite difference approximation, if applicable. Defaults to no bounds.

Constraint prepared from a user defined constraint.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.optimize._trustregion_constr.canonical_constraint.initial_constraints_as_canonical scipy.optimize._differentialevolution._ConstraintWrapper

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/optimize/_constraints.py#196
type: <class 'type'>
Commit: