# Python program illustrating
# numpy.random.rand () method
numpy as geek
# 1D Array
"1D Array filled with random values:"
1D Array filled with rand om values: [0.84503968 0.61570994 0.7619945 0.34994803 0.40113761]
Code 2: random construction of a one-dimensional array using Gaussian distribution
1D Array filled with random values as per gaussian distribution: [-0.99013172 -1.52521808 0.37955684 0.57859283 1.34336863] 3D Array filled with random values as per gaussian distribution: [[[-0.0320374 2.14977849 ]] [[0.3789585 0.17692125]]]
Code3: Python program that illustrates graphical representations of random and normal in NumPy
1D Array filled with random values as per gaussian distribution: [0.12413355 0.01868444 0.08841698 ..., -0.01523021 -0.14621625 -0.09157214] 1D Array filled with random values: [0.72654409 0.26955422 0.19500427 0.37178803 0.10196284]
In Code 3, graph 1 clearly shows the distribution of Gaussian because it is generated from the values generated by the random.normal () method, thus after being Gaussian.
plot 2 does not follow the distribution, as it is generated from random values generated by the random.rand () method.
Code 3 will not work to an online ID. Please run them on your systems to see how they work.
This article is provided by Mohit Gupta_OMG