bilby.core.utils.random.Generator
- class bilby.core.utils.random.Generator[source]
Bases:
objectClass to hold the random number generator.
This class is used to ensure that the same random number generator is used throughout
bilby.It should not be used directly, instead use
random.rngto generate random numbers. See the documentation for more details.- __init__(*args, **kwargs)
- __call__(*args, **kwargs)
Call self as a function.
Methods
__init__(*args, **kwargs)Attributes
Random number generator.
- rng = Generator(PCG64) at 0x7F91AE568D60
Random number generator.
This is a
numpy.random.Generatorobject that is used to generate random numbers. By default, it is not seeded.The recommended way to use this is to import the
randommodule and use therngattribute to generate random numbers. See the documentation for more details.