FutureLearn uses cookies to enhance your experience of the website. All but strictly necessary cookies are currently disabled for this browser. Turn on JavaScript to exercise your cookie preferences for all non-essential cookies. You can read FutureLearn's Cookie policy here.
Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. T&Cs apply
Source code for this exercise is located in numpy/random-numbers/
numpy/random-numbers/
Generate a one dimensional 1000 element array of uniformly distributed randomnumbers using the numpy.random module.
numpy.random
numpy.mean()
numpy.std()
You can visualize the random distributions with matplotlib’s hist()function:
hist()
import matplotlib.pyplot as pltplt.hist(x)plt.show()
Create an account to receive our newsletter, course recommendations and promotions.