I try to use cvxpy by using this code
`# Number of variables n = len(symbols)
x = Variable(n)
req_return = 0.02
ret = r.T*x
risk = quad_form(x, C)
prob = Problem(Minimize(risk), [sum(x)==1, ret >= req_return, x >= 0])`
And I got warning
C:\Users\LENOVO\anaconda3\lib\site-packages\cvxpy\expressions\expression.py:593: UserWarning:
This use of ``*`` has resulted in matrix multiplication.
Using ``*`` for matrix multiplication has been deprecated since CVXPY 1.1.
Use ``*`` for matrix-scalar and vector-scalar multiplication.
Use ``@`` for matrix-matrix and matrix-vector multiplication.
Use ``multiply`` for elementwise multiplication.
This code path has been hit 2 times so far.
warnings.warn(msg, UserWarning)
```
`
Try to solve the warning and no idea about warning
It's Warning mean your code run properly so Let's see the warning
The Warning tell us that
Using ``*`` for matrix multiplication has been deprecated since CVXPY 1.1.
so you already use CVXPY version upper 1.1 How to solve:
Use ``*`` for matrix-scalar and vector-scalar multiplication.
Use ``@`` for matrix-matrix and matrix-vector multiplication.
Use ``multiply`` for elementwise multiplication.
If ret = r.T*x
cannot run you can try ret = r.T @x
from CVXPY DOC