Random numbers with numpy
import numpy as np
np.random.uniform(-1, 1, size=50)
array([ 0.49539838, 0.43035945, 0.79026781, 0.28001463, -0.16320292,
0.89633064, 0.00344857, -0.76730168, -0.84719144, 0.36509597,
-0.68227327, 0.34856835, -0.31880533, 0.63343364, 0.61336679,
0.77168799, -0.77260954, 0.63779281, 0.71914075, 0.55045328,
0.69665936, 0.39580553, -0.18424476, 0.14493064, -0.27034756,
0.61780091, -0.11129419, -0.44827328, -0.18664985, -0.02084908,
0.53019057, 0.50920233, 0.78026455, 0.7620097 , -0.83641205,
0.39077726, -0.76821389, -0.28663047, 0.60993404, 0.3919517 ,
0.68862354, 0.24789238, -0.14832855, 0.29562044, -0.39572779,
0.89911049, 0.90169118, 0.35936399, 0.72234374, 0.92527244])
np.random.normal(loc=5, scale=1, size=50)
array([3.99540302, 5.42477798, 3.62330439, 4.9731306 , 6.21828079, 4.51902791, 6.1334842 , 4.56648912, 5.3992875 , 3.95050706, 5.73553032, 4.22494377, 5.360443 , 4.85094403, 4.1159568 , 3.45094822, 4.74610973, 5.41614584, 5.42907341, 5.49982898, 5.00877828, 5.77638055, 5.47671667, 7.06678715, 5.18896171, 5.27702582, 4.83959863, 4.70648175, 5.26616529, 6.56980397, 6.74427887, 5.81149735, 5.86143491, 5.96406701, 3.42832037, 6.55068341, 5.37860703, 5.16469798, 4.30811981, 5.19175355, 4.87997044, 6.16674248, 5.82573557, 5.32296077, 5.76484133, 6.41574398, 4.02551885, 4.09796754, 6.10984257, 3.33540774])
np.random.choice(a=['Peg', 'Sal', 'Tg', 'Ecc', 'Ale'], p=[0.2, 0.1, 0.3, 0.3, 0.1], replace=False, size=5)
array(['Ale', 'Sal', 'Ecc', 'Tg', 'Peg'], dtype='<U3')
np.random.randint(low=0, high=10, size=500)
array([1, 4, 9, 2, 0, 6, 5, 6, 9, 8, 0, 2, 7, 4, 5, 4, 3, 0, 1, 4, 5, 7,
5, 5, 6, 1, 6, 3, 6, 2, 8, 6, 6, 7, 3, 4, 9, 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