summaryrefslogtreecommitdiff
path: root/python/uniform.py
blob: e2e3af125e5f4c506573cfea02cf3a44875938b2 (plain)
1
2
3
4
5
6
7
8
#!/usr/bin/env python2

import numpy as np

n=10000.0
s=100.0
print "should be ~ %d: %d"%(int(s),len([x for x  in (np.random.uniform(0,1,int(n)) >= (1-(s/n))) if x]))