Create array with Random Numbers with random module of Numpy library.
In this Numpy tutorial we are creating two arrays of random numbers. First one with random numbers from uniform distribution and second one where random numbers are from normal distribution.
# Imports import numpy as np # Let's build array of random numbers arr = np.random.rand(2,3) arr
array([[ 0.93478063, 0.42155196, 0.84486895], [ 0.29931957, 0.34730261, 0.37111244]])
# Random numbers from normal distribution array_n = np.random.randn(2,3) array_n
array([[-0.15518876, -0.17738767, -1.11339571], [-1.14957402, -1.45929511, 0.85649973]])