flopscope.stats.laplace.ppf
flopscope.stats.laplace.ppf(q, loc=0, scale=1)[flopscope source]
Evaluate the percent-point function.
Parameters
- q:array_like
Probabilities in
[0, 1].- loc:float, optional
Location parameter of the distribution. Defaults to
0.- scale:float, optional
Scale parameter of the distribution. Defaults to
1.
Returns
- :FlopscopeArray
Quantiles corresponding to
q.
Notes
Equivalent to scipy.stats.laplace.ppf(q, loc, scale).
FLOP cost: 51 * numel(q) (composite: two eager log branches +
edge selects, weight 1.0). Derivation (FMA=2): 2 eager log branches
(2×16=32) + 19 arith/cmp/select (branch A: maximum+2 mul+add=4;
branch B: sub+maximum+2 mul+sub=5; where#1 cmp+select=2; where#2
2 cmp+and+select=4; where#3,#4 cmp+select=2 each).
Examples
>>> import flopscope.numpy as fnp
>>> import flopscope as flops
>>> q = flops.array([0.25, 0.5, 0.75])
>>> flops.round(flops.stats.laplace.ppf(q), 3)
array([-0.693, 0. , 0.693])