我想采用变量列表的 2 范数。如何将序列转换为与 CVXPY 兼容的变量“列表”?有没有办法处理这个?提前致谢。例如,
test_a=cvxpy.Variable(1)
test_b=cvxpy.Variable(1)
mylist= [test_a,test_b]
mynorm=cvxpy.norm(mylist,2) #error thrown for this line
packages/cvxpy/interface/matrix_utilities.py", line 63, in size
return (len(constant[0]), len(constant))