Matti,
> On 7 Mar 2015, at 19:37, Matti Picus <[email protected]> wrote:
>
> '''
> jumpahead(self, n) method of random.Random instance
> Change the internal state to one that is likely far away
> from the current state. This method will not be in Py3.x,
> so it is better to simply reseed.
> '''
Thanks for pointing out.
I'm using the jumpahead() to have multiple streams in parallel, derived from a
single point.
def jumpRandomState(self):
self.random.setstate(self.randomState)
self.random.jumpahead(1)
self.randomState = self.random.getstate()
Would this be a good alternative?
def jumpRandomState(self):
self.random.setstate(self.randomState)
self.random.seed(self.random.random())
self.randomState = self.random.getstate()
.Floris
_______________________________________________
pypy-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-dev