https://github.com/ekg/freebayes
Raw File
Tip revision: d527d78904e7db73fc0d1ac6cf468aeaaa3e9d08 authored by Erik Garrison on 14 November 2015, 15:39:28 UTC
Setting Release-Version v1.0.0
Tip revision: d527d78
factorialln.py
from scipy.special import gamma, gammaln

def factorialln(n):
    if n == 1:
        return 0
    elif n == 0:
        return 0
    elif n < 0:
        raise Exception("factorial is not defined for n < 0")
    else:
        return gammaln(n + 1)
back to top