Say I have a rectangle [a,b]x[c,d], where a,b,c,d are reals. I would like to produce k points (x,y) sampled uniformly from this rectangle, i.e. a <= x <= c and b <= y <= d. Obviously, if sampling from [0,1]x[0,1] is possible, then the problem is solved. How to achieve any of the two goals, in python? Or, another tool such as R, for example?
Aucun commentaire:
Enregistrer un commentaire