pyarts3.arts.random.lognormal_distribution

random.lognormal_distribution(N: int = 1, mean: float = 0.0, stddev: float = 1.0) pyarts3.arts.Vector

Generate random numbers following a lognormal distribution

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

import matplotlib.pyplot as plt
import pyarts3 as pa

plt.hist(pa.arts.random.lognormal_distribution(10000, 0.0, 1.0), bins=50, density=True)
plt.title("A plotting example")
plt.xlabel("Value")
plt.ylabel("Density")
plt.yscale("log")

(Source code, svg, pdf)

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

  • mean (float) – Mean of the underlying normal distribution. Default is 0.0.

  • stddev (float) – Standard deviation of the underlying normal distribution. Default is 1.0.

Returns:

The distribution

Return type:

Vector