9951 explained code solutions for 126 technologies


python-numpyHow to copy Numpy array


import numpy as np

arr = np.array([1, 2, 3])
arr_copy = np.copy(arr)ctrl + c
np.array

declare Numpy array

.copy

copy specified array

arr

array to copy

arr_copy

copy of arr array