mercredi 20 mai 2020

How do I create a matrix of non-repeating random numbers with numpy, while having a range between these random numbers?

This line of code already create a 3x3 matrix populated with random numbers between 0 and 8, but some of them are duplicated. How to stop this?

initStateRandom = np.random.randint(9, size=(3,3))



Aucun commentaire:

Enregistrer un commentaire