numpy的 copy & deep copy

AS NP numpy Import
a np.arange = (. 4)
B = a
C = a
D = B
such an assignment is essentially a number of these, when a number of other changes will follow each change, if not want with a change of the change should this assignment:
B = a.copy ()

Published 79 original articles · won praise 1 · views 1412

Guess you like

Origin blog.csdn.net/DAN_L/article/details/104701061