Question: Problem 2 Write a program to select out the elements from the above array A, only if its value is greater than 5 . Expected

 Problem 2 Write a program to select out the elements from

Problem 2 Write a program to select out the elements from the above array A, only if its value is greater than 5 . Expected output: array([12, 8, 9, 17, 7, 11, 19, 21]) Problem 3 If the value of the elements in Array A is greater than 5, write a program to replace that element with zero. Expected output: array([[1,4,5,0,5],[5,0,0,0,0],[6,0,0,0,0]) Problem 4 Write a program to vertically stack the following two 1-dimensional arrays and insert a new array at the end row. The elements of the new array must be the sum of the x and y arrays down the column. x=np.array([1,2,3])y=np.array([4,5,6]) Expected output: array([[1, 2, 3], [4,5,6], [5,7,9]1) Problem 5 Write a program to vertically stack the following two 1-dimensional arrays and insert a new array at the end column. The elements of the new array must be the sum of the x and y arrays across the row. x=np.array([1,2,3])y=np.array([4,5,6]) Expected output: array([[ 1, 2, 3, 6], [4,5,6,15]])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!