Closed steve3141 closed 9 years ago
Can you give me some more information? What are the dimensions of A, b, and c?
Thanks!
On Mon, Sep 22, 2014 at 8:09 AM, steve3141 notifications@github.com wrote:
There seems to be an error in the python packing code corresponding to a mixed quadratic/affine constraint, eg
square(norm(A_x)) - 2_b*x <= c
generates a line:
(params['b']).T = sp.coo_matrix((params['b']).T)
which produces the error:
AttributeError: attribute 'T' of 'numpy.ndarray' objects is not writable
I'm using numpy 14; it's possible that this -- ie assigning to a transpose -- used to work in version 13, I haven't checked, but in any case the transpose appears to be unnecessary.
(There is no such error with a pure affine constraint, it appears to be triggered by the combination of quadratic and affine)
Regards, Steve
— Reply to this email directly or view it on GitHub https://github.com/cvxgrp/qcml/issues/52.
i should point out that #45 affects this. so if your parameter b = np.matrix([1,2])
vs b = np.matrix([[1],[2]])
surprising things could happen. let me think of a good fix for this (possibly involving coercing parameters to the right shapes), but in the meantime, this specific issue is fixed.
Thanks, Eric, for the prompt (as always) response. As I've mentioned before I'm working in a pretty highly controlled environment at the moment so it will be a little while before I'm able to test this, but I'm sure from what you say that it is fixed. Thanks again. Steve
Re: #45. That unfortunately is a kind of a mess, if you'll forgive my saying so. The thing is that the very same expression is treated differently when it's a constraint than when it's an objective function. In one case you've got to provide a row, in the other case it has to be a column. It's hard to keep straight and get it right. (It's worth it, of course, since the program is tremendously useful!)
There seems to be an error in the python packing code corresponding to a mixed quadratic/affine constraint, eg
generates a line:
which produces the error:
I'm using numpy 14; it's possible that this -- ie assigning to a transpose -- used to work in version 13, I haven't checked, but in any case the transpose appears to be unnecessary.
(There is no such error with a pure affine constraint, it appears to be triggered by the combination of quadratic and affine)
Regards, Steve