NumPy for Data Science – Part 5
The difference between copy and view
- The copy owns the data
- The copy of an array is a new array.
- The changes made in the copy data does not reflect in the original array.
- The view does not own the data
- A view of the original array.
- Any changes made in the view will affect the original array, and any changes made in the original array will affect the view.
Join & split function
Join array – joining means putting contents of two or more array in a single array.
hstack vs vstack
The major difference is that np.hstack combines NumPy arrays horizontally and np.vstack combines arrays vertically.
Split – splitting breaks one array into multiple.
Spread the knowledge