bundles / scipy latest / scipy / optimize / _constraints / Bounds / residual
function
scipy.optimize._constraints:Bounds.residual
Signature
def residual ( self , x ) Summary
Calculate the residual (slack) between the input and the bounds
Extended Summary
For a bound constraint of the form
lb <= x <= ubthe lower and upper residuals between x and the bounds are values sl and sb such that
lb + sl == x == ub - sbWhen all elements of sl and sb are positive, all elements of x lie within the bounds; a negative element in sl or sb indicates that the corresponding element of x is out of bounds.
Parameters
x: array_likeVector of independent variables
Returns
sl, sb: array-likeThe lower and upper residuals
Aliases
-
scipy.optimize.Bounds.residual