Skip to content

Instantly share code, notes, and snippets.

@puneetlakhina
Created April 10, 2012 06:44
Show Gist options
  • Save puneetlakhina/2348857 to your computer and use it in GitHub Desktop.
Save puneetlakhina/2348857 to your computer and use it in GitHub Desktop.
Multiply probabilities by doing log sum
import math
def lpm(*args):
return sum([math.log(x) for x in args])
lpm(0.1,0.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment