I'm using the Python API. Is there a vectorized way to add the following constraints?
v <= u[:, :, i] @ x
for i in range(u.shape)
where v and x are MVars, e.g.
v.shape == (2,)
x.shape == (3,)
u.shape == (2, 3, 4)
This is a time-critical component of my program, but Python for loops are very slow and take up a lot of time.
Please sign in to leave a comment.