mardi 29 novembre 2022

pick elements from the list randomly in uniform distribution without replacement

I have a list that ranges from 0 to 30

arr = range(0,30)

I need to pick a sample of "m" elements from the list using uniform distribution without replacement. I used random.uniform() which gives the random value in float.

Can anyone tell me how to pick the "m" elements from the given list randomly using uniform distribution without replacement?




Aucun commentaire:

Enregistrer un commentaire