Dear all,
lately i noticed a strange behaviour when manipulating symbolic SX arrays. In particular, after reassigning the content of a variable to a new one, changing elements of the latter also affects the original.
A simple example may be more explicative:
import casadi.*
a = [SX.sym('x'); 3];
b = a;
b(2) = 7;
now, if i check
>>a =
[x, 7]
it inherits the change performed on b.
I am not sure if this is the intended behaviour or a bug, but i wanted to share this since it costed me a lot of time to debug one of my projects.
Thanks,
Eugeniu