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

binomial_distribution()

Generate random numbers following a binomial distribution

Method

cauchy_distribution()

Generate random numbers following a cauchy distribution

Method

chi_squared_distribution()

Generate random numbers following a chi-squared distribution

Method

exponential_distribution()

Generate random numbers following an exponential distribution

Method

fisher_f_distribution()

Generate random numbers following a fisher f distribution

Method

gamma_distribution()

Generate random numbers following a gamma distribution

Method

geometric_distribution()

Generate random numbers following a geometric distribution

Method

lognormal_distribution()

Generate random numbers following a lognormal distribution

Method

normal_distribution()

Generate random numbers following a normal distribution

Method

poisson_distribution()

Generate random numbers following a poisson distribution

Method

student_t_distribution()

Generate random numbers following a student t distribution

Method

uniform_int_distribution()

Generate random numbers following a uniform distribution

Method

uniform_real_distribution()

Generate random numbers following a uniform distribution

Method

weibull_distribution()

Generate random numbers following a weibull distribution

Operator

__eq__()

Return self==value.

Operator

__format__()

Default object formatter.

Operator

__ge__()

Return self>=value.

Operator

__gt__()

Return self>value.

Operator

__hash__()

Return hash(self).

Operator

__init__()

Overloaded function.

Operator

__le__()

Return self<=value.

Operator

__lt__()

Return self<value.

Operator

__ne__()

Return self!=value.

Operator

__repr__()

Return repr(self).

Operator

__str__()

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.

  1. __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)

  1. __init__(self, seed: int) -> None

Initialize the RNG with an integer seed

  1. __init__(self) -> None

  2. __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.

  1. __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)

  1. __init__(self, seed: int) -> None

Initialize the RNG with an integer seed

  1. __init__(self) -> None

  2. __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).