Here are some small examples of convex objectives (under minimization) one would expect to work.
Objective | CVXPY code | Result | Notes |
---|---|---|---|
\[\color{darkred}x^T \color{darkred}x\] | x.T@x | DCP error | print shows minimize x@x, i.e. transpose is dropped |
\[\color{darkred}x^T \color{darkred}x\] | x@x | DCP error | |
\[\color{darkred}x^T \color{darkred}x\] | cp.sum_squares(x) | transformed into quad_over_lin(x, 1.0) | |
\[\color{darkred}x^T \color{darkblue}Q \color{darkred}x\] | x.T@Q@x | transformed into QuadForm(x,Q) | |
\[\color{darkred}y:=\color{darkred}x-\color{darkblue}p\]\[\color{darkred}x^T \color{darkblue}Q \color{darkred}y\] | y=x-p x.T@Q@y | DCP error | |
\[\color{darkred}x^T \color{darkblue}Q \color{darkred}x - \color{darkred}x^T \color{darkblue}Q \color{darkblue}p\] | x.T@Q@x - x.T@Q@p | first term transformed into QuadForm(x,Q) |
Not everything makes sense to me. I am not sure why x.T@x is not properly recognized, but x.T@Q@x is.