pyarts3.arts.random.uniform_real_distribution

random.uniform_real_distribution(N: int = 1, lower_bound: float = 0.0, upper_bound: float = 1.0) pyarts3.arts.Vector

Generate random numbers following a uniform distribution

Wraps std::uniform_real_distribution from the C++ standard library.

import matplotlib.pyplot as plt
import pyarts3 as pa

plt.hist(pa.arts.random.uniform_real_distribution(10000, 0, 10), bins=50, density=True)
plt.title("A plotting example")
plt.xlabel("Value")
plt.ylabel("Density")

(Source code, svg, pdf)

_images/pyarts3-arts-random-uniform_real_distribution-1.svg
Parameters:
  • N (int) – Number of random numbers to generate. Default is 1.

  • lower_bound (float) – Lower bound of the uniform distribution. Default is 0.0.

  • upper_bound (float) – Upper bound of the uniform distribution. Default is 1.0.

Returns:

The distribution

Return type:

Vector