shared.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:adversarial-variational-bayes 作者: gdikov 项目源码 文件源码
def volume_of_the_unit_ball(d):
    """ Volume of the d-dimensional unit ball.

    Parameters
    ----------
    d : int
        dimension.

    Returns
    -------         
    vol : float
          volume.

    """

    vol = pi**(d/2) / gamma(d/2+1)  # = 2 * pi^(d/2) / ( d*gamma(d/2) )

    return vol
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号