Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
vstack()
vstack ( tup )
Stack arrays in sequence vertically (row wise). This is equivalent to concatenation along the first axis after 1-D arrays of shape (N,) have been reshaped to (1,N).
This method has the same behavior as numpy.vstack, except that it always returns a gurobipy matrix-friendly API object of the appropriate type.
Arguments:
tup: A sequence of matrix-friendly API objects
Return value:
Returns a matrix-friendly API object. Note that the return type depends on the types of the input objects.
Example usage:
X =Â model.addMVar((n, k)) Y =Â model.addMVar((m, k)) XY = gp.vstack((X, Y)) # (n+m, k) MVar