Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
hstack()
hstack ( tup )
Stack arrays in sequence horizontally (column wise). This is equivalent to concatenation along the second axis, except for 1-D arrays where it concatenates along the first axis.
This method has the same behavior as numpy.hstack, 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((k, n)) Y =Â model.addMVar((k, m)) XY = gp.hstack((X, Y)) # (k, n+m) MVar