Showing the uniform distributionΒΆ

Example of drawing random uniform number with threefry.

../_images/sphx_glr_plot_uniform_distribution_001.png
import threefry
import matplotlib.pyplot as plt

r = threefry.rng(673144720833845866)

data = [r.random_uniform() for i in range(5000)]

plt.hist(data, bins=32, normed=True)
plt.xlabel(r'$x$')
plt.ylabel(r'$P(x)$')
plt.show()

Total running time of the script: ( 0 minutes 0.106 seconds)

Generated by Sphinx-Gallery