mercredi 10 mars 2021

random numer generation except inside of the circle in python

I want to generate 750 random number in 2D data x (0,1) and y (0,1)

X1 = np.random.random((750,2))

However, I want to make sure I don't have any value in the circular region such as

enter image description here

I can remove the value, but I want to fix the number of the random number to be 750. What would be the best way to generate such list?




Aucun commentaire:

Enregistrer un commentaire