mvpa2.testing.tools.reseed_rng¶
-
mvpa2.testing.tools.
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)