https://github.com/ekg/freebayes
Tip revision: 69f09a5c8bc9c55009e0cded93372ba5119ffe97 authored by Erik Garrison on 06 July 2013, 11:42:45 UTC
Setting Release-Version v0.9.9.2
Setting Release-Version v0.9.9.2
Tip revision: 69f09a5
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)