Expand description
Collection of functions related to random number generation
Enums§
- Shape
OrCount - Shape or count for the categorical distribution.
Functions§
- bernoulli
- Generate Bernoulli random values with a given
p
value. - bernoulli_
device - Generate Bernoulli random values with a given
p
value. - categorical
- Sample from a categorical distribution.
- categorical_
device - Sample from a categorical distribution.
- gumbel
- Sample from the standard Gumbel distribution.
- gumbel_
device - Sample from the standard Gumbel distribution.
- key
- Get a PRNG key from a seed.
- multivariate_
normal - Generate jointly-normal random samples given a mean and covariance.
- multivariate_
normal_ device - Generate jointly-normal random samples given a mean and covariance.
- normal
- Generate normally distributed random numbers.
- normal_
device - Generate normally distributed random numbers.
- randint
- Generate random integers from the given interval (
lower:
andupper:
). - randint_
device - Generate random integers from the given interval (
lower:
andupper:
). - seed
- Seed the random number generator.
- split
- Split a PRNG key into two keys and return a tuple.
- split_
device - Split a PRNG key into two keys and return a tuple.
- truncated_
normal - Generate values from a truncated normal distribution between
low
andhigh
. - truncated_
normal_ device - Generate values from a truncated normal distribution between
low
andhigh
. - uniform
- Generate uniformly distributed random numbers.
The values are sampled uniformly in the half-open interval
[lower, upper)
. The lower and upper bound can be scalars or arrays and must be broadcastable toshape
. - uniform_
device - Generate uniformly distributed random numbers.
The values are sampled uniformly in the half-open interval
[lower, upper)
. The lower and upper bound can be scalars or arrays and must be broadcastable toshape
.