Write a program that uses NumPy, creates two random 100 × 100 arrays, and adds them together in two different ways: the

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a program that uses NumPy, creates two random 100 × 100 arrays, and adds them together in two different ways: the

Post by answerhappygod »

Write a program that uses NumPy, creates two random 100 × 100 arrays, and adds them together in two different ways: the first by using a double for-loop, and the second by using the NumPy “+” operator. Time how long each method takes to add the arrays.
Time each method 1000 times and record the timing results in a vector length of 1000. For each method: (a) Print the average and standard deviation of the running time. (b) Plot a histogram of the running times.
plz provide code for this quesiton
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply