cvxopt矩阵转换converting numpy vector to cvxoptq = q.astype(np.double)cvx_q = matrix(q)CVX only accepts doubles, not ints.
官网参考:http://cvxopt.org/userguide/matrices.html?highlight=matrix#cvxopt.matrix