BayesicFitting

Model Fitting and Evidence Calculation

View project on GitHub



Module LogFactorial Source

method that returns the log of the factorial of a number.

logFactorial( )

logFactorial. It provides the natural log of k!

if k is float, it will be truncated to int

Parameters

  • k : int or array_like of int
         the number(s) the factorial is wanted for.

Return

  • float : the ( natural ) log( k! ).

Example

print( logFactorial( 0 ) )
0
print( logFactorial( [3, 5, 10] ) )
[1.7917594692280550, 4.7874917427820458, 15.1044125730755159]

Author

Do Kester, shamelessly copied from J.Skilling