Generator

Standard library class numpy.random.bitgen.Generator View source
class Generator
@tuple
class Generator[G]
Fields 4
lock Lock
bit_generator BitGenerator[G]
G type
T type
Constructors 3
__new__
__new__(g: G)
__new__
@pure @derives @llvm
__new__(ptr: cobj)
ret ptr %ptr
__new__
@overload
__new__()
Methods 45
spawn
spawn(self, n_children: int)
random
random(self, size = None, dtype: type = float, out = None)
beta
beta(self, a, b, size = None)
exponential
exponential(self, scale = 1.0, size = None)
standard_exponential
standard_exponential(self, size = None, dtype: type = float, method: str = "zig", out = None)
integers
integers(self, low, high = None, size = None, dtype: type = int, endpoint: bool = False)
bytes
bytes(self, length: int)
choice
choice(self, a, size = None, replace: bool = True, p = None, axis: int = 0, shuffle: bool = True)
uniform
uniform(self, low = 0.0, high = 1.0, size = None)
standard_normal
standard_normal(self, size = None, dtype: type = float, out = None)
normal
normal(self, loc = 0.0, scale = 1.0, size = None)
standard_gamma
standard_gamma(self, shape, size = None, dtype: type = float, out = None)
gamma
gamma(self, shape, scale = 1.0, size = None)
f
f(self, dfnum, dfden, size = None)
noncentral_f
noncentral_f(self, dfnum, dfden, nonc, size = None)
chisquare
chisquare(self, df, size = None)
noncentral_chisquare
noncentral_chisquare(self, df, nonc, size = None)
standard_cauchy
standard_cauchy(self, size = None)
standard_t
standard_t(self, df, size = None)
vonmises
vonmises(self, mu, kappa, size = None)
pareto
pareto(self, a, size = None)
weibull
weibull(self, a, size = None)
power
power(self, a, size = None)
laplace
laplace(self, loc = 0.0, scale = 1.0, size = None)
gumbel
gumbel(self, loc = 0.0, scale = 1.0, size = None)
logistic
logistic(self, loc = 0.0, scale = 1.0, size = None)
lognormal
lognormal(self, mean = 0.0, sigma = 1.0, size = None)
rayleigh
rayleigh(self, scale = 1.0, size = None)
wald
wald(self, mean, scale, size = None)
triangular
triangular(self, left, mode, right, size = None)
binomial
binomial(self, n, p, size = None)
negative_binomial
negative_binomial(self, n, p, size = None)
poisson
poisson(self, lam = 1.0, size = None)
zipf
zipf(self, a, size = None)
geometric
geometric(self, p, size = None)
hypergeometric
hypergeometric(self, ngood, nbad, nsample, size = None)
logseries
logseries(self, p, size = None)
multivariate_normal
multivariate_normal(self, mean, cov, size = None, check_valid: Literal[str] = "warn", tol: float = 1e-8, method: Literal[str] = "svd")
multinomial
multinomial(self, n, pvals, size = None)
multivariate_hypergeometric
multivariate_hypergeometric(self, colors, nsample: int, size = None, method: str = "marginals")
dirichlet
dirichlet(self, alpha, size = None)
permuted
permuted(self, x, axis = None, out = None)
shuffle
shuffle(self, x, axis: int = 0)
permutation
permutation(self, x, axis: int = 0)
send
send(self, what: T)
Special methods 8
__str__
__str__(self)
__promise__
@__internal__
__promise__(self)
__next__
__next__(self: Generator[T])
__iter__
__iter__(self)
__raw__
@pure @derives @llvm
__raw__(self)
ret ptr %self
__done__
@pure @llvm
__done__(self)
declare i1 @llvm.coro.done(ptr nocapture readonly)
%0 = call i1 @llvm.coro.done(ptr %self)
%1 = zext i1 %0 to i8
ret i8 %1
__resume__
@nocapture @llvm
__resume__(self)
declare void @llvm.coro.resume(ptr)
call void @llvm.coro.resume(ptr %self)
ret {} {}
__repr__
__repr__(self)