helper_functions#

Provides functions to sample from distributions.

get_random_array_from_distribution(distribution: Distribution[float], shape: tuple[int, ...]) ndarray[Any, dtype[float64]]#

Samples a random array from the given distribution.

Parameters:
  • distribution – The distribution to sample from.

  • shape – The shape of the output array.

Returns:

A random array sampled from the distribution.

get_random_value_from_distribution(distribution: Distribution[T]) T#

Samples a random value from the given distribution.

Parameters:

distribution – The distribution to sample from.

Returns:

A random value sampled from the distribution.