flopscope.stats.truncnorm.cdf
flopscope.stats.truncnorm.cdf(x, a, b, loc=0, scale=1)[flopscope source]
Evaluate the cumulative distribution function.
Parameters
- x:array_like
Points at which to evaluate the cumulative probability.
- a:float
Lower standardized bound.
- b:float
Upper standardized bound.
- loc:float, optional
Mean of the underlying normal distribution. Defaults to
0.- scale:float, optional
Standard deviation of the underlying normal distribution. Defaults to
1.
Returns
- :FlopscopeArray
Cumulative probability evaluated elementwise at
x.
Notes
Equivalent to scipy.stats.truncnorm.cdf(x, a, b, loc, scale).
FLOP cost: 1 * numel(x).
Examples
>>> import flopscope.numpy as fnp
>>> import flopscope as flops
>>> x = flops.array([-0.5, 0.0, 0.5])
>>> flops.round(flops.stats.truncnorm.cdf(x, a=-1.0, b=1.0), 3)
array([0.22, 0.5 , 0.78])