Introduction:
numpy is python library created to provide the fast access to array elements.
numpy array is stored in the continuous memory locations, so its faster than the list to access.
This also provides functions to work with linear algebra, fourier transform, and metrices.

Array creation:
Slicing array:
Slicing array means taking elements from the given index (start) to another given (end) index.
If we don't pass the starting index, then starting index considered as 0. Similarly if no end index provided, then end index considered as length of the array.
Default step size is 1.
Start index considered from 0 index value, end index considered from 1 index.
For example:
from 3rd index from the end to first index from the end. In this time, start index starts count from 1 index, end index start count from 0 index
View and Copy
The difference between the copy and view is that copy is the new array and view is the view of the original array.
Copy owns the array data. Any changes made in the copy array doesn't affect the original array, and any changes made in the original array doesn't affect the copy array.
The view doesn't own any data, any changes in the original array affects the view array , and any changes in the original array affects the view array.
For example:
Shape of the array
Numpy array have an attribute called shape which return the tuple with each index having corresponding number of elements. (Number of elements in each dimension)
For example:
Reshaping array
Reshaping array means changing the dimension of the array.
Shape of the array is number of elements in each dimension.
We can specify -1 for only one dimension, numpy decides the dimension. -1 not allowed more than once.
newarr = arr.reshape(2, 2, -1)
Iterating the array elements
Iterating the elements from the array can be done by for loop, but we need to write n number of for loops based on the dimensions to print the elements.
Instead we can use "nditer" attribute from numpy to iterate the elements.3 ] [5 6 7 8]] [[1 2 3 4]
Iterate elements by step size.
When we need to know the index of the elements while iterating, we can use 'ndenumerate" attribute
Split the array
array_split attribute from numpy helps to split one array into multiple arrays.
By default, split works in column axis(axis 0).
array_split returns the results as lists. Also, it does not affect the original array.
Note: If split has to happen in the specific axis(row or column), pass axis=(value) in array_split function as argument. (column =0, row axis = 1)
If the number of elements are not sufficient to split , then array_split adjust the elements in the last array. This functionality is the difference between the Split and array_split function.
array_hsplit() is equivalent to row axis split.
array_vsplit() is equivalent to column axis split
Array search:
You can search the certain value in the array, and it returns the index. The return is list of array.
If the specific value is not present in the array, it returns the empty array.
If more elements need to be searched, then array can be passed.
searchsorted() is a function which does the binary search on the array by default from left side, and return the index where the specific value to get inserted to maintain the sorted order.
If search has to happen from right side, 'right=side' has to pass as argument.