vendredi 5 mars 2021

Generate N-dimensional matrix of random floats in numpy

To create N-dim matrix with numpy we can use:

matrix= np.random.randint(5, size=(5, 5))

Suppose I would like to get double values between 0 and 4 like 2.555 or 1.434 what function should i use?




Aucun commentaire:

Enregistrer un commentaire