Skip to main content

numpy.random.bitgen

Standard library Module View source
alias u128
u128 = UInt[128]
Alias of UInt[128]
class Binomial
class Binomial
Fields 16
psave float
nsave int
r float
q float
fm float
m int
p1 float
xm float
xl float
xr float
c float
laml float
lamr float
p2 float
p3 float
p4 float
Constructors 1
__init__
__init__(self: Self)
class BitGenerator
class BitGenerator[G]
Fields 5
state G
binomial Optional[Binomial]
uinteger u32
has_uint32 bool
G type
Constructors 1
__init__
__init__(self: Self, state: G)
Properties 1
seed_seq
@property
seed_seq(self: Self)
Methods 97
next64
next64(self: Self)
next32
next32(self: Self)
next_double
next_double(self: Self)
next_float
next_float(self: Self)
jumped
jumped(self: Self, jumps: int)
standard_uniform
standard_uniform(self: Self)
standard_uniform_f
standard_uniform_f(self: Self)
random_standard_uniform_fill
random_standard_uniform_fill(self: Self, cnt: int, out: Ptr[float])
random_standard_uniform_fill_f
random_standard_uniform_fill_f(self: Self, cnt: int, out: Ptr[float32])
standard_exponential_unlikely
standard_exponential_unlikely(self: Self, idx: int, x: float)
random_standard_exponential
random_standard_exponential(self: Self)
random_standard_exponential_fill
random_standard_exponential_fill(self: Self, cnt: int, out: Ptr[float])
standard_exponential_unlikely_f
standard_exponential_unlikely_f(self: Self, idx: int, x: float32)
random_standard_exponential_f
random_standard_exponential_f(self: Self)
random_standard_exponential_fill_f
random_standard_exponential_fill_f(self: Self, cnt: int, out: Ptr[float32])
random_standard_exponential_inv_fill
random_standard_exponential_inv_fill(self: Self, cnt: int, out: Ptr[float])
random_standard_exponential_inv_fill_f
random_standard_exponential_inv_fill_f(self: Self, cnt: int, out: Ptr[float32])
random_standard_normal
random_standard_normal(self: Self)
random_standard_normal_fill
random_standard_normal_fill(self: Self, cnt: int, out: Ptr[float])
random_standard_normal_f
random_standard_normal_f(self: Self)
random_standard_normal_fill_f
random_standard_normal_fill_f(self: Self, cnt: int, out: Ptr[float32])
random_standard_gamma
random_standard_gamma(self: Self, shape: float)
random_standard_gamma_f
random_standard_gamma_f(self: Self, shape: float32)
random_positive_int64
random_positive_int64(self: Self)
random_positive_int32
random_positive_int32(self: Self)
random_positive_int
random_positive_int(self: Self)
random_uint
random_uint(self: Self)
random_loggam
random_loggam(x: float)
random_normal
random_normal(self: Self, loc: float, scale: float)
random_exponential
random_exponential(self: Self, scale: float)
random_uniform
random_uniform(self: Self, off: float, rng: float)
random_gamma
random_gamma(self: Self, shape: float, scale: float)
random_gamma_f
random_gamma_f(self: Self, shape: float32, scale: float32)
random_beta
random_beta(self: Self, a: float, b: float)
random_chisquare
random_chisquare(self: Self, df: float)
random_f
random_f(self: Self, dfnum: float, dfden: float)
random_standard_cauchy
random_standard_cauchy(self: Self)
random_pareto
random_pareto(self: Self, a: float)
random_weibull
random_weibull(self: Self, a: float)
random_power
random_power(self: Self, a: float)
random_laplace
random_laplace(self: Self, loc: float, scale: float)
random_gumbel
random_gumbel(self: Self, loc: float, scale: float)
random_logistic
random_logistic(self: Self, loc: float, scale: float)
random_lognormal
random_lognormal(self: Self, mean: float, sigma: float)
random_rayleigh
random_rayleigh(self: Self, mode: float)
random_standard_t
random_standard_t(self: Self, df: float)
random_poisson_mult
random_poisson_mult(self: Self, lam: float)
random_poisson_ptrs
random_poisson_ptrs(self: Self, lam: float)
random_poisson
random_poisson(self: Self, lam: float)
random_negative_binomial
random_negative_binomial(self: Self, n: float, p: float)
random_binomial_btpe
random_binomial_btpe(self: Self, n: int, p: float)
random_binomial_inversion
random_binomial_inversion(self: Self, n: int, p: float)
random_binomial
random_binomial(self: Self, p: float, n: int)
random_noncentral_chisquare
random_noncentral_chisquare(self: Self, df: float, nonc: float)
random_noncentral_f
random_noncentral_f(self: Self, dfnum: float, dfden: float, nonc: float)
random_wald
random_wald(self: Self, mean: float, scale: float)
random_vonmises
random_vonmises(self: Self, mu: float, kappa: float)
random_logseries
random_logseries(self: Self, p: float)
random_geometric_inversion
random_geometric_inversion(self: Self, p: float)
random_geometric
random_geometric(self: Self, p: float)
random_zipf
random_zipf(self: Self, a: float)
random_triangular
random_triangular(self: Self, left: float, mode: float, right: float)
random_interval
random_interval(self: Self, max: u64)
gen_mask
gen_mask(max: u64)
buffered_uint16
buffered_uint16(self: Self, bcnt: int, buf: u32)
buffered_uint8
buffered_uint8(self: Self, bcnt: int, buf: u32)
bounded_masked_uint64
bounded_masked_uint64(self: Self, rng: u64, mask: u64)
buffered_bounded_masked_uint32
buffered_bounded_masked_uint32(self: Self, rng: u32, mask: u32, bcnt: int, buf: u32)
buffered_bounded_masked_uint16
buffered_bounded_masked_uint16(self: Self, rng: u16, mask: u16, bcnt: int, buf: u32)
buffered_bounded_masked_uint8
buffered_bounded_masked_uint8(self: Self, rng: u8, mask: u8, bcnt: int, buf: u32)
buffered_bounded_bool
buffered_bounded_bool(self: Self, off: bool, rng: bool, mask: bool, bcnt: int, buf: u32)
bounded_lemire_uint64
bounded_lemire_uint64(self: Self, rng: u64)
buffered_bounded_lemire_uint32
buffered_bounded_lemire_uint32(self: Self, rng: u32, bcnt: int, buf: u32)
buffered_bounded_lemire_uint16
buffered_bounded_lemire_uint16(self: Self, rng: u16, bcnt: int, buf: u32)
buffered_bounded_lemire_uint8
buffered_bounded_lemire_uint8(self: Self, rng: u8, bcnt: int, buf: u32)
random_bounded_uint64
random_bounded_uint64(self: Self, off: u64, rng: u64, mask: u64, use_masked: bool)
random_buffered_bounded_uint32
random_buffered_bounded_uint32(self: Self, off: u32, rng: u32, mask: u32, use_masked: bool, bcnt: int, buf: u32)
random_buffered_bounded_uint16
random_buffered_bounded_uint16(self: Self, off: u16, rng: u16, mask: u16, use_masked: bool, bcnt: int, buf: u32)
random_buffered_bounded_uint8
random_buffered_bounded_uint8(self: Self, off: u8, rng: u8, mask: u8, use_masked: bool, bcnt: int, buf: u32)
random_buffered_bounded_bool
random_buffered_bounded_bool(self: Self, off: bool, rng: bool, mask: bool, use_masked_bool, bcnt: int, buf: u32)
random_bounded_uint64_fill
random_bounded_uint64_fill(self: Self, off: u64, rng: u64, cnt: int, use_masked: bool, out: Ptr[u64])
random_bounded_uint32_fill
random_bounded_uint32_fill(self: Self, off: u32, rng: u32, cnt: int, use_masked: bool, out: Ptr[u32])
random_bounded_uint16_fill
random_bounded_uint16_fill(self: Self, off: u16, rng: u16, cnt: int, use_masked: bool, out: Ptr[u16])
random_bounded_uint8_fill
random_bounded_uint8_fill(self: Self, off: u8, rng: u8, cnt: int, use_masked: bool, out: Ptr[u8])
random_bounded_bool_fill
random_bounded_bool_fill(self: Self, off: bool, rng: bool, cnt: int, use_masked: bool, out: Ptr[bool])
random_multinomial
random_multinomial(self: Self, n: int, mnix: Ptr[int], pix: Ptr[float], d: int)
hypergeometric_sample
hypergeometric_sample(self: Self, good: int, bad: int, sample: int)
hypergeometric_hrua
hypergeometric_hrua(self: Self, good: int, bad: int, sample: int)
random_hypergeometric
random_hypergeometric(self: Self, good: int, bad: int, sample: int)
random_multivariate_hypergeometric_count
random_multivariate_hypergeometric_count(self: Self, total: int, num_colors: int, colors: Ptr[int], nsample: int, num_variates: int, variates: Ptr[int])
random_multivariate_hypergeometric_marginals
random_multivariate_hypergeometric_marginals(self: Self, total: int, num_colors: int, colors: Ptr[int], nsample: int, num_variates: int, variates: Ptr[int])
next_raw
next_raw(self: Self)
random_raw
random_raw(self: Self, lock, size, output)
random_raw(self: Self, size = None)
shuffle_raw
shuffle_raw(self: Self, n: int, first: int, itemsize: int, stride: int, data: cobj, buf: cobj)
shuffle_int
shuffle_int(self: Self, n: int, first: int, data: Ptr[int])
shuffle_raw_wrap
shuffle_raw_wrap(self: Self, n: int, first: int, itemsize: int, stride: int, data: cobj, buf: cobj)
function validate_output_shape
validate_output_shape(iter_shape, output: ndarray)
function check_output
check_output[dtype: type](out, size, require_c_array: bool)
function double_fill
double_fill(func, size, lock, out)
function float_fill
float_fill(func, size, lock, out)
function float_fill_from_double
float_fill_from_double(func, size, lock, out)
variable CONS_NONE
CONS_NONE: Literal[int] = 0
variable CONS_NON_NEGATIVE
CONS_NON_NEGATIVE: Literal[int] = 1
variable CONS_POSITIVE
CONS_POSITIVE: Literal[int] = 2
variable CONS_POSITIVE_NOT_NAN
CONS_POSITIVE_NOT_NAN: Literal[int] = 3
variable CONS_BOUNDED_0_1
CONS_BOUNDED_0_1: Literal[int] = 4
variable CONS_BOUNDED_GT_0_1
CONS_BOUNDED_GT_0_1: Literal[int] = 5
variable CONS_BOUNDED_LT_0_1
CONS_BOUNDED_LT_0_1: Literal[int] = 6
variable CONS_GT_1
CONS_GT_1: Literal[int] = 7
variable CONS_GTE_1
CONS_GTE_1: Literal[int] = 8
variable CONS_POISSON
CONS_POISSON: Literal[int] = 9
variable MAX_INT
MAX_INT: Literal[int] = 0x7FFFFFFFFFFFFFFF
variable MAXSIZE
MAXSIZE: Literal[int] = MAX_INT
variable POISSON_LAM_MAX
POISSON_LAM_MAX = (MAX_INT - (sqrt(float(MAX_INT)) * 10))
function check_array_constraint
check_array_constraint(val, name: str, const: int)
function convert_array_like
convert_array_like(a)
function gather_arrays
gather_arrays(t)
function cont
cont[dtype: type = float](fn, size, lock, arrays, names, constraints, out = None)
function kahan_sum
kahan_sum(darr: Ptr[float], n: int)
class Generator
@tuple
class Generator[G]
Fields 3
lock Lock
bit_generator BitGenerator[G]
G type
Constructors 1
__new__
__new__(g: G)
Methods 44
spawn
spawn(self: Self, n_children: int)
random
random[dtype: type = float](self: Self, size = None, out = None)
beta
beta(self: Self, a, b, size = None)
exponential
exponential(self: Self, scale = 1.0, size = None)
standard_exponential
standard_exponential[dtype: type = float](self: Self, size = None, method: str = "zig", out = None)
integers
integers[dtype: type = int](self: Self, low, high = None, size = None, endpoint: bool = False)
bytes
bytes(self: Self, length: int)
choice
choice(self: Self, a, size = None, replace: bool = True, p = None, axis: int = 0, shuffle: bool = True)
uniform
uniform(self: Self, low = 0.0, high = 1.0, size = None)
standard_normal
standard_normal[dtype: type = float](self: Self, size = None, out = None)
normal
normal(self: Self, loc = 0.0, scale = 1.0, size = None)
standard_gamma
standard_gamma[dtype: type = float](self: Self, shape, size = None, out = None)
gamma
gamma(self: Self, shape, scale = 1.0, size = None)
f
f(self: Self, dfnum, dfden, size = None)
noncentral_f
noncentral_f(self: Self, dfnum, dfden, nonc, size = None)
chisquare
chisquare(self: Self, df, size = None)
noncentral_chisquare
noncentral_chisquare(self: Self, df, nonc, size = None)
standard_cauchy
standard_cauchy(self: Self, size = None)
standard_t
standard_t(self: Self, df, size = None)
vonmises
vonmises(self: Self, mu, kappa, size = None)
pareto
pareto(self: Self, a, size = None)
weibull
weibull(self: Self, a, size = None)
power
power(self: Self, a, size = None)
laplace
laplace(self: Self, loc = 0.0, scale = 1.0, size = None)
gumbel
gumbel(self: Self, loc = 0.0, scale = 1.0, size = None)
logistic
logistic(self: Self, loc = 0.0, scale = 1.0, size = None)
lognormal
lognormal(self: Self, mean = 0.0, sigma = 1.0, size = None)
rayleigh
rayleigh(self: Self, scale = 1.0, size = None)
wald
wald(self: Self, mean, scale, size = None)
triangular
triangular(self: Self, left, mode, right, size = None)
binomial
binomial(self: Self, n, p, size = None)
negative_binomial
negative_binomial(self: Self, n, p, size = None)
poisson
poisson(self: Self, lam = 1.0, size = None)
zipf
zipf(self: Self, a, size = None)
geometric
geometric(self: Self, p, size = None)
hypergeometric
hypergeometric(self: Self, ngood, nbad, nsample, size = None)
logseries
logseries(self: Self, p, size = None)
multivariate_normal
multivariate_normal[check_valid: Literal[str] = "warn", method: Literal[str] = "svd"](self: Self, mean, cov, size = None, tol: float = 1e-8)
multinomial
multinomial(self: Self, n, pvals, size = None)
multivariate_hypergeometric
multivariate_hypergeometric(self: Self, colors, nsample: int, size = None, method: str = "marginals")
dirichlet
dirichlet(self: Self, alpha, size = None)
permuted
permuted(self: Self, x, axis = None, out = None)
shuffle
shuffle(self: Self, x, axis: int = 0)
permutation
permutation(self: Self, x, axis: int = 0)
Special methods 1
__str__
__str__(self: Self)