The random.jumpahead documentation says this:

    Changed in version 2.3: Instead of jumping to a specific state, n steps
    ahead, jumpahead(n) jumps to another state likely to be separated by
    many steps..

I really want a way to get to the Nth value in a random series started
with a particular seed.  Is there any way to quickly do what jumpahead
apparently used to do?

I devised this function, but I suspect it runs really slowly:

def trudgeforward(n):
    '''Advance the random generator's state by n calls.'''
    for _ in xrange(n): random.random()

So any speed tips would be very appreciated.

TIA


-- 
A better way of running series of SAS programs:
http://overlook.homelinux.net/wilsonwiki/SasAndMakefiles
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to