制服#

astropy.uncertainty.uniform(*, lower=None, upper=None, center=None, width=None, n_samples, cls=<class 'astropy.uncertainty.core.Distribution'>, **kwargs)[源代码]#

从上下限创建一个统一的分布。

请注意,此函数要求关键字是显式的,并且要求 lower/uppercenter/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 : Distribution or object分布或对象

采样的均匀分布。类型将与参数相同 cls