When I attempted the code below, I got an error about using a non-integral type inside of the brackets. That is was I had wanted to do, though. I expected that the bracket operator on a Constant would have an overload that took a cvxpy primitive. How difficult would it be to make this work? Or maybe there is some other method I should be using? (Note: I know that I can solve my problem this with a boolean mask; I have that working at present. I was just looking for an exponential decrease in variable count.)
A = cvxpy.Constant(my_long_data_vector)
x = cvxpy.Variable(x_len, integer=True)
... add some constraints on x ...
objective = cvxpy.Minimize(A[x[0]]+A[x[1]]...)