resqpy.olio.random_seed.seed

resqpy.olio.random_seed.seed(seed, package='all')[source]

Set seed for random number generator of one or more packages, to allow for repeatable behaviour.

Parameters:
  • seed (int) – the value to use to seed the random number generator(s); a value of None will generally result in an unrepeatable sequence

  • package (string or list of strings) – one or more of known packages: ‘random’ and ‘numpy’ at present; passing ‘all’ will cause all packages known to have a random number generator to be re-seeded