In this python numpy program, we will generate an array of 5 random numbers from a standard normal distribution using NumPy.
Steps to solve the program
- Import the numpy library as np.
- Generate an array of 5 random numbers from a standard normal distribution using np.random.normal(size=5).
- Print the output.
import numpy as np
x = np.random.normal(size=5)
print(x)
Output :
[ 0.07450327 -1.26415493 0.61604056 0.61595139 -1.07081685]