Commit 6ea1333
Propagate initial values to reduced variables for diag attribute (#154)
When CvxAttr2Constr creates reduced variables for dimension-reducing
attributes (e.g. diag=True), the initial value was not propagated to
the reduced variable, causing NLP solvers to fail. This mirrors the
existing value propagation already done for parameters.
Also handle sparse diagonal matrices in lower_value() by using
.diagonal() instead of np.diag() which doesn't accept sparse input.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent de847aa commit 6ea1333
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| |||
0 commit comments