pymc.distributions.shape_utils.to_tuple#

pymc.distributions.shape_utils.to_tuple(shape)[源代码]#

将整数、数组和 None 转换为元组

参数:
形状: None, int 或类数组

表示要转换为元组的形状。

返回:
If shape is None, returns an empty tuple. If it’s an int, (shape,) is
returned. If it is array_like, tuple(shape) is returned.