Question: Write a Python program that accomplishes the following: 1 . Generate a random 2 - dimensional NumPy array of size ( m , n )
Write a Python program that accomplishes the following:
Generate a random dimensional NumPy array of size mn with random integers ranging from to
Reshape the array to size mn using the reshape function.
Compute the mean, median, and standard deviation of the array using NumPy functions.
Slice the array to get the first k elements, where k is the total number of elements in the array divided by
Split the array in to p equal parts, where p is a random integer between and
Compute the elementwise sum of the split arrays using vectorisation.
Your program should output the original random array, the reshaped array, the mean, median, and standard deviation of the array, the sliced array, the split arrays, and the elementwise sum of the split arrays.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
