def normal(x, loc, scale):
"""
Get the probability density for a normal distribution.
:param x: Edges of bins within which to calculate probability density
:type x: :class:`~numpy.ndarray`
:param int loc: Mean of the distribution (see :data:`~scipy.stats.norm`)
:param int scale: Standard deviation of the distribution \
(see :data:`~scipy.stats.norm`)
:returns: Probability density over x. Return \
array has one less value than x, as the first value of \
the return array is the probability density between x[0] \
and x[1].
"""
norm_y = norm.cdf(x, loc, scale)
norm_y = un_cumulative(norm_y)
return sum_to_1(norm_y)
评论列表
文章目录