Question: > > > import numpy as np > > > # Create a 1 0 x 1 0 array of random numbers between 0 and

>>> import numpy as np
>>> # Create a 10x10 array of random numbers between 0 and 1
>>> np_data = np.random.rand(10,10)
>>> print(np_data)
[[0.810638720.869076460.023515490.896290610.759771650.48272052
0.130703770.519373940.173101710.18208237]
[0.477156320.10908230.81287030.593153910.592837130.73636613
0.787887650.20984780.806152670.25269005]
[0.16266410.590571960.905671540.266928660.471223090.65950776
0.656330230.555909680.367671040.63703037]
[0.585718190.041647090.362065770.053507720.140542770.17739393
0.028904630.655285430.110347190.75307595]
[0.085326410.428222510.922302820.990787340.076899540.9548549
0.803221430.619019910.508259570.08965907]
[0.787785670.095507780.924816250.219058150.063182570.83367072
0.341340870.600174360.265112950.54679753]
[0.544612480.735776230.737744140.442399890.619935770.32134461
0.786920860.136596770.367498710.26352234]
[0.358028620.72643030.610888780.677910550.399097370.99350935
0.880436790.45706350.942302130.81441661]
[0.984358930.461410150.191260120.646574180.803214880.88912749
0.944499470.664554590.774669720.46370016]
[0.25229730.425638160.038420180.647727780.652152960.23856408
0.478938870.789117880.176430240.14731243]]
2) slice the sub-array of 6th-10th rows, 1st-5th columns of np_data, and name it as subdata (subdata should be a 5x5 array). Print out the sub-array.

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 Programming Questions!