C1_W2_Lab02_Multiple_Variable_Soln

What is the function of copy.deepcopy in w = copy.deepcopy(w_in) and why we used it??
and when we removed it and put w = w_in it gives the same output

1 Like

Deepcopy is used so as to not change the original values of a matrix or array w_in in case its needed later on in the process or not have weird results. There a few post about deepcopy in this part of the forum you can search about them!

1 Like