Re: random.sample with large weighted sample-sets?

2014-02-16 Thread Charles Allen
How efficient does this thing need to be? You can always just turn it into a two-dimensional sampling problem by thinking of the data as a function f(x=item), generating a random x=xr in [0,x], then generating a random y in [0,max(f(x))]. The xr is accepted if 0 y = max(f(xr)), or rejected (and

Re: python in academics?

2007-11-01 Thread Charles Allen
to most course sequences: http://www4.ncsu.edu/~rwchabay/mi/ -- Charles Allen -- http://mail.python.org/mailman/listinfo/python-list