9951 explained code solutions for 126 technologies


python-numpyGenerate random array


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

load Numpy module for Python

.random.rand(

returns array of random float values in 0...1 range of a given size

(3,2)

size of the array to generate (3x2 in our case)

arr

generated aarray