Problem with python code and cvxopt

(Ha Thanh Minh) #1

I am learning branch-and-bound methods from this course: and running the python file utilizing python 3.5. However, I face with one problem which, I guess, is at the following commands:

min_mat = matrix(0, (n,n), tc='d')
min_mat[range(0, n**2, n+1)] = matrix(mins)

max_mat = matrix(0, (n,n), tc='d')
max_mat[range(0, n**2, n+1)] = matrix(maxes)

The error is that:

min_mat[range(0, n**2, n+1)] = matrix(mins)

TypeError: invalid index arguments

Could you please help me fix this problem?
Thank you very much!

(Mark L. Stone) #2

Although inspired by CVX, cvxopt is a different product than CVX, and is not in scope of this forum. Perhaps you should post at!forum/cvxopt .

(Michael C. Grant) #3