def UniformBoundedRV(lower=0., upper=1.):
r"""A uniform prior between two finite bounds.
This is a convenience function with more natural bound parameters
than ``scipy.stats.uniform``.
:param lower: lower bound of parameter range
:type lower: float
:param upper: upper bound of parameter range
:type upper: float
:return: a frozen rv_continuous instance with normalized uniform
probability inside the range [lower, upper] and 0 outside
"""
uu = scipy.stats.uniform(lower, (upper - lower))
return uu
评论列表
文章目录