lundi 15 juin 2020

Multiple Random Matrices in Python

How can I generate multiple different random matrixes of this sort:

rand_pix_l = np.random.randint(256, size=(5,5))

I would like to be able to predefine how many matrices I get that I will later loop over to create a meshgrid of this sort:

x,y = np.meshgrid(np.linspace(0,1,rand_pix_l.shape[0]),np.linspace(0,1,rand_pix_l.shape[1])) 

for each of the random matrices I generated.




Aucun commentaire:

Enregistrer un commentaire