lundi 5 décembre 2016

Generate random gaussian integers in python

I have been trying with random and numpy module in python. However, the random library seems to give integers from an uniform distribution. The numpy module offers floating point numbers from the gaussian distributions. But what I need is, integers from a gaussian distribution where I would specify the lower and upper bound.

For example, I want to generate 1000 integers from 1 to 100, where the mean would be 50.5.

Thanks.

Howe could I do that?




Aucun commentaire:

Enregistrer un commentaire