[Numpy-discussion] Random number generation and testing across different OS's.

Andrew Nelson andyfaff at gmail.com
Fri Apr 12 10:50:33 EDT 2013

    I have written a differential evolution optimiser that i use for
    curvefitting.  As a genetic optimisation technique it is stochastic and
    relies heavily on random number generators to do the minimisation.  As part
    of the module tests I would like to write a cross-platform test that checks
    if the fitting is being done correctly.
    I use an instance of numpy.random.RandomState for the generation.  If I use
    the seed method on a single platform I get the same output, which I could
    use to write a test.  However, I am unsure of how the seeding and
    RandomState works across platforms.
    If I use the same seed on OSX/Windows/Linux, will I get the same stream of
    random numbers being generated? I need to know if the test I write works
    across platforms.

Dr. Andrew Nelson


More information about the NumPy-Discussion mailing list