RandomNumberGenerator
- class pyarts3.arts.RandomNumberGenerator(*args, **kwargs)
Random number generator interface. Create an instance of this class and call the distribution methods to get a function that generates random numbers following the specified distribution.
Overview
Method
Generate random numbers following a binomial distribution
Method
Generate random numbers following a cauchy distribution
Method
Generate random numbers following a chi-squared distribution
Method
Generate random numbers following an exponential distribution
Method
Generate random numbers following a fisher f distribution
Method
Generate random numbers following a gamma distribution
Method
Generate random numbers following a geometric distribution
Method
Generate random numbers following a lognormal distribution
Method
Generate random numbers following a normal distribution
Method
Generate random numbers following a poisson distribution
Method
Generate random numbers following a student t distribution
Method
Generate random numbers following a uniform distribution
Method
Generate random numbers following a uniform distribution
Method
Generate random numbers following a weibull distribution
Operator
Return self==value.
Operator
Default object formatter.
Operator
Return self>=value.
Operator
Return self>value.
Operator
Return hash(self).
Operator
Overloaded function.
Operator
Return self<=value.
Operator
Return self<value.
Operator
Return self!=value.
Operator
Return repr(self).
Operator
Return str(self).
Constructors
- __init__(self, time: pyarts3.arts.Time = 2026-02-24 13:31:15.888388879) None
- __init__(self, seed: int) None
- __init__(self) None
- __init__(self, arg: pyarts3.arts.RandomNumberGenerator) None
Overloaded function.
__init__(self, time: pyarts3.arts.Time = 2026-02-24 13:31:15.888388879) -> None
Initialize the RNG with the time seed (at startup by default)
__init__(self, seed: int) -> None
Initialize the RNG with an integer seed
__init__(self) -> None__init__(self, arg: pyarts3.arts.RandomNumberGenerator) -> None
Methods
- binomial_distribution(self, n: int = 1, p: float = 0.5) collections.abc.Callable[[], int]
Generate random numbers following a binomial distribution
- cauchy_distribution(self, location: float = 0.0, scale: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a cauchy distribution
- chi_squared_distribution(self, n: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a chi-squared distribution
- exponential_distribution(self, lambda: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following an exponential distribution
- fisher_f_distribution(self, d1: float = 1.0, d2: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a fisher f distribution
- gamma_distribution(self, alpha: float = 1.0, beta: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a gamma distribution
- geometric_distribution(self, p: float = 0.5) collections.abc.Callable[[], int]
Generate random numbers following a geometric distribution
- lognormal_distribution(self, mean: float = 0.0, stddev: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a lognormal distribution
- normal_distribution(self, mean: float = 0.0, stddev: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a normal distribution
- poisson_distribution(self, mean: float = 1.0) collections.abc.Callable[[], int]
Generate random numbers following a poisson distribution
- student_t_distribution(self, n: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a student t distribution
- uniform_int_distribution(self, lower_bound: int = 0, upper_bound: int = 10) collections.abc.Callable[[], int]
Generate random numbers following a uniform distribution
- uniform_real_distribution(self, lower_bound: float = 0.0, upper_bound: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a uniform distribution
- weibull_distribution(self, a: float = 1.0, b: float = 1.0) collections.abc.Callable[[], float]
Generate random numbers following a weibull distribution
Operators
- __eq__(value, /)
Return self==value.
- __format__(format_spec, /)
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
- __ge__(value, /)
Return self>=value.
- __gt__(value, /)
Return self>value.
- __hash__()
Return hash(self).
- __init__(self, time: pyarts3.arts.Time = 2026-02-24 13:31:15.888388879) None
- __init__(self, seed: int) None
- __init__(self) None
- __init__(self, arg: pyarts3.arts.RandomNumberGenerator) None
Overloaded function.
__init__(self, time: pyarts3.arts.Time = 2026-02-24 13:31:15.888388879) -> None
Initialize the RNG with the time seed (at startup by default)
__init__(self, seed: int) -> None
Initialize the RNG with an integer seed
__init__(self) -> None__init__(self, arg: pyarts3.arts.RandomNumberGenerator) -> None
- __le__(value, /)
Return self<=value.
- __lt__(value, /)
Return self<value.
- __ne__(value, /)
Return self!=value.
- __repr__()
Return repr(self).
- __str__()
Return str(self).