Copy vectors
Hello everyone,
I have the following problem: I have two vectors v = vector(QQ, [1,1]), w = vector(QQ, [3,3]). I want to copy the coefficients of w into v. I can't set v = w directly, beacuse v is used as a value in some dictionaries. I could loop over the list() of the vectors, but I was wondering if there is some better way to copy all of the entries.
Example from comment:
l = {1: v}; v.set(1,2) Now l == {1: (1, 2)}, but v = copy(w) does not change l