What should be done about 'Reading from a sparse CVXPY expression via .value is discouraged.'?
#2782
Replies: 1 comment 2 replies
-
|
okay I see what you are getting at here. What we mean when we say its "discouraged" is that it would be better if you extracted the sparse value (since your variable is sparse in the first place) to get a sparse coo array as your solution. But if you insist on getting the dense value, then you can definitely keep using I can see how the wording can be confusing.. signaling that perhaps |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was able to find this example
(which doesn't work, even if I remove the
[...]), but replacingX.valuewithX.value_sparsegives a different type (coo_arrayin the latter I think). It would be nice if the warning gave a recommended change likeX.value_sparse.toarray()for dense results orX.value_sparsefor sparse results (if that is what is encouraged).Beta Was this translation helpful? Give feedback.
All reactions