9951 explained code solutions for 126 technologies


python-numpyGenerate random array with normal distribution


import numpy as np
arr = np.random.randn(3, 2)ctrl + c
import numpy as np

load Numpy module for Python

.random.randn(

returns array of random float values with normal distribution

(3, 2)

array size to generate (3x2 in our case)

arr

generated array