numpy.random.bit_generator.BitGenerator¶
-
class
numpy.random.bit_generator.
BitGenerator
(seed=None)¶ Base Class for generic BitGenerators, which provide a stream of random bits based on different algorithms. Must be overridden.
Parameters: - seed : {None, int, array_like[ints], ISeedSequence}, optional
A seed to initialize the
BitGenerator
. If None, then fresh, unpredictable entropy will be pulled from the OS. If anint
orarray_like[ints]
is passed, then it will be passed toSeedSequence
to derive the initialBitGenerator
state. One may also pass in an implementor of theISeedSequence
interface likeSeedSequence
.
Attributes: - lock : threading.Lock
Lock instance that is shared so that the same BitGenerator can be used in multiple Generators without corrupting the state. Code that generates values from a bit generator should hold the bit generator’s lock.
- See Also
- ——-
- SeedSequence
Methods
random_raw
(self[, size])Return randoms as generated by the underlying BitGenerator