Even when assigning a separate array to a slice, NumPy does not create a persistent copy of the right-hand side array. The values are transferred directly to the original array’s memory:
= np.zeros(5)
original = np.array([1, 2, 3])
new_data 1:4] = new_data # Values copied directly into original's array memory
original[0] = 999 # Does NOT affect original array
new_data[print(original) # [0, 1, 2, 3, 0]