A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.LinearConstraint.html below:

LinearConstraint — SciPy v1.16.0 Manual

scipy.optimize.

LinearConstraint#
class scipy.optimize.LinearConstraint(A, lb=-inf, ub=inf, keep_feasible=False)[source]#

Linear constraint on the variables.

The constraint has the general inequality form:

Here the vector of independent variables x is passed as ndarray of shape (n,) and the matrix A has shape (m, n).

It is possible to use equal bounds to represent an equality constraint or infinite bounds to represent a one-sided constraint.

Parameters:
A{array_like, sparse array}, shape (m, n)

Matrix defining the constraint.

lb, ubdense array_like, optional

Lower and upper limits on the constraint. Each array must have the shape (m,) or be a scalar, in the latter case a bound will be the same for all components of the constraint. Use np.inf with an appropriate sign to specify a one-sided constraint. Set components of lb and ub equal to represent an equality constraint. Note that you can mix constraints of different types: interval, one-sided or equality, by setting different components of lb and ub as necessary. Defaults to lb = -np.inf and ub = np.inf (no limits).

keep_feasibledense array_like of bool, optional

Whether to keep the constraint components feasible throughout iterations. A single value set this property for all components. Default is False. Has no effect for equality constraints.

Methods


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4