{ } Raw JSON

bundles / scipy 1.17.1 / scipy / optimize / _linprog_util / _format_A_constraints

function

scipy.optimize._linprog_util:_format_A_constraints

source: /scipy/optimize/_linprog_util.py :160

Signature

def   _format_A_constraints ( A n_x sparse_lhs = False )

Summary

Format the left hand side of the constraints to a 2-D array

Parameters

A : 2-D array

2-D array such that A @ x gives the values of the upper-bound (in)equality constraints at x.

n_x : int

The number of variables in the linear programming problem.

sparse_lhs : bool

Whether either of A_ub or A_eq are sparse. If true return a coo_array instead of a numpy array.

Returns

: np.ndarray or sparse.coo_array

2-D array such that A @ x gives the values of the upper-bound (in)equality constraints at x.

Aliases

  • scipy.optimize._linprog_util._format_A_constraints