制服#
- astropy.uncertainty.uniform(*, lower=None, upper=None, center=None, width=None, n_samples, cls=<class 'astropy.uncertainty.core.Distribution'>, **kwargs)[源代码]#
从下限和上限创建均匀分布。
请注意,此函数要求关键字是显式的,并且要求
lower/upper或center/width.- 参数:
- lower : array_likeNumpy:ARRAY_LIKE
这个分布的下边缘。如果
Quantity,分配的单位将与lower.- 上面的 :
Quantity数量 此分布的上边缘。必须匹配形状,如果
Quantity必须具有与lower.- center : array_likeNumpy:ARRAY_LIKE
分布的中心值。不能与同时提供
lower/upper.- width : array_likeNumpy:ARRAY_LIKE
分布的宽度。必须具有相同的形状和兼容的单位
center(如果有的话)。- n_samples :
intPython :整型 用于此分布的蒙特卡罗样本数
- cls类
用于创建此分发的类。通常是
Distribution子类。- Remaining keywords are passed into the constructor of the ``cls``
- 返回:
- distr :
Distributionorobject分布或对象 采样的均匀分布。类型将与参数相同
cls。
- distr :