New vector with CVXPY variables

import numpy as np
import cvxpy as cvx

PH = cvx.Variable((4,24),pos=True)
PT = cvx.Variable(24,pos=True)
V = cvx.Variable((4,24),pos=True)
Q = cvx.Variable((4,24),pos=True)
S = cvx.Variable((4,24),pos=True)

for j in range (0,4):
for t in range(0,24):

Hi, I am trying to create a new vector wich is a combination of the variables that I already created by using the function variable, the thing is that this error message

raceback (most recent call last):

File “”, line 1, in

File “C:\Users\Usuario\Anaconda3\lib\site-packages\numpy\matrixlib\”, line 142, in new
arr = N.array(data, dtype=dtype, copy=copy)

TypeError: data type not understood

I think that numpy doesn’t work with the variables that cvxpy creates. Do you know how can I create a new vector with variables from cvxpy? thanks in advance for your help.

Although there is a common heritage, this forum addresses CVX, not CVXPY. Please post your question at!forum/cvxpy .

1 Like