Num Py Lab Part-1-2
Num Py Lab Part-1-2
Array Creation
Reference: https://numpy.org/doc/stable/reference/routines.array-creation.html
1. Create a Numpy array of 4 elements without initialization
2. Array of 5 with initilzation to 0
3. Get the following output
5. Create new empty array with the same shape and type as a given array
6. Get the following output
9. Create an array of ones with the same shape and type as a given array.
10. Create an Array with Zeros with custom data type
11. an array of zeros with the same shape and type as a given array.
12. a new array of given shape and type, filled with fill_value.
13. A full array with the same shape and type as a given array.
arr = np.array([1,2,3,4,5,6,7])
18. print the last 4 numbers from the array below:
arr = np.array([1,2,3,4,5,6,7])
arr = np.array([1,2,3,4,5,6,7])