laplace#
Module for sampling from a Laplace distribution.
Functions#
Returns inverse CDF for Lap(u,b) at p. |
|
Samples a float from the Laplace distribution. |
- laplace_inverse_cdf(u, b, p, prec)#
Returns inverse CDF for Lap(u,b) at p.
- Parameters
u (float) – The mean of the distribution. Must be finite and non-nan.
b (float) – The scale of the distribution. Must be finite, non-nan and non-negative.
p (tmlt.core.utils.arb.Arb) – Probability to compute the CDF at.
prec (int) – Precision to use for computing CDF.
- Return type
- laplace(u, b, step_size=63)#
Samples a float from the Laplace distribution.