gwpopulation.utils

Helper functions for probability distributions and backend switching.

Functions

apply_conditions(conditions)

A decorator to apply conditions to inputs of a function.

beta_dist(xx, alpha, beta[, scale])

Beta distribution probability

get_name(input)

Attempt to find the name of the the input.

get_version_information()

powerlaw(xx, alpha, high, low)

Power-law probability

to_number(value, func)

to_numpy(array)

Convert an array to a numpy array.

truncnorm(xx, mu, sigma, high, low)

Truncated normal probability

unnormalized_2d_gaussian(xx, yy, mu_x, mu_y, ...)

Compute the probability distribution for a correlated 2-dimensional Gaussian neglecting normalization terms.

von_mises(xx, mu, kappa)

PDF of the von Mises distribution defined on the standard interval.