distributions.py 文件源码

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

项目:neurotools 作者: michaelerule 项目源码 文件源码
def poisson_logpdf(k,l):
    '''
    Gives the log-pdf for a poisson distribution with rate l 
    evaluated at points k. k should be a vector of integers.

    Parameters
    ----------

    Returns
    -------
    '''
    # k,l = map(np.float128,(k,l))
    return k*slog(l)-l-np.array([scipy.special.gammaln(x+1) for x in k])
    #return k*slog(l)-l-np.array([log_factorial(x) for x in k])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号