Welcome folks today in this blog post we will be generating random number
arrays using numpy
library. All the full source code of the application is shown below.
Get Started
In order to get started you need to install the following libraries using the pip
command as shown below
pip install numpy
After installing this library make an app.py
file and copy paste the following code
app.py
For generating One dimensional arrays
1 2 3 4 5 6 |
import numpy as np #numpy array with random values a = np.random.rand(7) print(a) |
For Two Dimensional Arrays
app.py
For Three Dimensional Arrays
app.py