mvpa2.testing.datasets.reseed_rng

mvpa2.testing.datasets.reseed_rng()

Decorator to assure the use of MVPA_SEED while running the test

It resets random number generators (both python and numpy) to the initial value of the seed value which was set while importing mvpa, which could be controlled through configuration/environment.

Examples

>>> @reseed_rng()
... def test_random():
...     import numpy.random as rnd
...     print rnd.randint(100)

Previous topic

mvpa2.testing.datasets.random_affine_transformation

Next topic

mvpa2.testing.datasets.saveload_warehouse

NeuroDebian

NITRC-listed