osqp / osqp-matlab

Matlab interface for OSQP
https://osqp.org/
Apache License 2.0
42 stars 25 forks source link

Fix emosqp so it allows 0 length to be specified in matrix updates #18

Closed imciner2 closed 5 years ago

imciner2 commented 5 years ago

emosqp allows 0 to be specified in the length field, but that field is used to allocate the array when copying to floats. If the user gives 0, we need to fallback to the stored nz length of the array instead of using 0 (since then no memory will be allocated).

Fixes https://github.com/oxfordcontrol/osqp/issues/203.

bstellato commented 5 years ago

Amazingly quick! Thanks a lot!