First page Back Continue Last page Overview Graphics
Numpy: Copies vs. Views
- Views are created by slicing through an array
- This does not create a new array in memory
- Instead, the same memory address is shared by the original array and new sliced view
- Changing data on the view will change the original array!
- Use the copy function to copy an array to a completely new location in memory