9951 explained code solutions for 126 technologies


python-numpyGenerate random array of int values


import numpy as np
arr = np.random.randint(10, 20, [3, 2])ctrl + c
import numpy as np

load Numpy module for Python

.random.randint(

returns array of random int values in specified range of specified size

10, 20

range to generate random int values from

[3, 2]

array size to generate (3x2 in our case)

arr

generated array