set_seed
=True, net_id=0) core.Global.set_seed(seed, use_seed_seq
Sets the seed of the random number generators, both in ANNarchy.RandomDistributions and in the C++ library when it is created.
Numpy still has to be seeded explicitly when using the default RNG, for example:
=42)
ann.set_seed(seed= np.random.default_rng(seed=42)
rng = rng.uniform(0.0, 1.0, (10, 10)) A
Parameters
Name | Type | Description | Default |
---|---|---|---|
seed | int | integer value used to seed the C++ and Numpy RNG | required |
use_seed_seq | bool | for openMP and parallel RNGs, we use either the STL SeedSequence (True, default) or a specialized implementation proposed by Melissa O’Neil (False, see _optimization_flags for more details). | True |