Hi everyone I am sorry if this is a noob question but I am using python and I have an issue where I copy an array but then when I modify the copy it affects the original. I
toAdd is not a duplicate. The following makes toAdd refer to the same sub-list as xyzCoord[i]:
toAdd
xyzCoord[i]
toAdd = xyzCoord[i]
When you change elements of toAdd, the corresponding elements of xyzCoord[i] also change.
Instead of the above, write:
toAdd = xyzCoord[i][:]
This will make a (shallow) copy.