Exercise 4
- create a null vector / 1D array of size 10 and update fifth index to 11.
- Write a NumPy program to create a 2x3 arrays and change it into 3x2 arrays.
- Write a NumPy program to create a 2d array with 1 on the border and 0 inside.
- Take a look at the following matrix. Access the [2,1,1]
Assignment
- Create a 4x4 matrix with values ranging from 0 to 3.
- Create and array with shape of 4x4 and turn it into two arrays along the second axis.
Exercise 4
- Find all trips that is greater than 10 miles and originated from New York and Morrisville
Hint: use and
Exercise 5
- Create a new column with the following condition:
a) >10 : Long Trip
b) 5-10 : Medium Trip
c) <5 : Short Trip