The ExtendedGenerator
provides access to a small number of distributions that are not present in NumPy. The default bit generator used by ExtendedGenerator
is PCG64
. The bit generator can be changed by passing an instantized bit generator to ExtendedGenerator
. It is also possible to share a bit generator with an instance of NumPy’s numpy.random.Generator
.
None
)¶
Additional random value generator using a bit generator source.
ExtendedGenerator
exposes methods for generating random numbers from some distributions that are not in numpy.random.Generator.
None
¶
Bit generator to use as the core generator. If none is provided, uses PCG64(variant=”cm-dxsm”).
Examples
>>> from randomgen import ExtendedGenerator
>>> rg = ExtendedGenerator()
>>> rg.complex_normal()
-0.203 + .936j # random
Using a specific generator
>>> from randomgen import MT19937
>>> rg = ExtendedGenerator(MT19937())
Share a bit generator with numpy
>>> from numpy.random import Generator, PCG64
>>> pcg = PCG64()
>>> gen = Generator(pcg)
>>> eg = ExtendedGenerator(pcg)
Get or set the bit generator's state
Gets the bit generator instance used by the generator
Distributions¶uintegers
([size, bits])
Return random unsigned integers
random
([size, dtype, out])
Return random floats in the half-open interval [0.0, 1.0).
complex_normal
([loc, gamma, relation, size])
Draw random samples from a complex normal (Gaussian) distribution.
multivariate_normal
(mean, cov[, size, ...])
Draw random samples from a multivariate normal distribution.
multivariate_complex_normal
(loc[, gamma, ...])
Draw random samples from a multivariate complex normal (Gaussian) distribution.
standard_wishart
(df, dim[, size, rescale])
Draw samples from the Standard Wishart and Pseudo-Wishart distributions
wishart
(df, scale[, size, check_valid, tol, ...])
Draw samples from the Wishart and pseudo-Wishart distributions.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4