Skip to content
Snippets Groups Projects
Commit 8c52644e authored by Matthew David Pitkin's avatar Matthew David Pitkin
Browse files

likelihood.py: fix install error

parent 3b9d00e6
No related branches found
No related tags found
1 merge request!132Add Poisson likelihood to core likelihood functions
......@@ -188,15 +188,15 @@ class PoissonLikelihood(Likelihood):
"value!"))
# Return the summed log likelihood
return -self.N*rate + np.sum(self.counts*np.log(rate)) -
self.sumlogfactorial
return (-self.N*rate + np.sum(self.counts*np.log(rate))
- self.sumlogfactorial)
elif isinstance(rate, np.ndarray):
# check rates are positive
if np.any(rate < 0.):
raise ValueError(("Poisson rate function returns a negative")),
raise ValueError(("Poisson rate function returns a negative",
" value!"))
return np.sum(-rate + self.counts*np.log(rate)) -
self.sumlogfactorial
return (np.sum(-rate + self.counts*np.log(rate))
- self.sumlogfactorial)
else:
raise ValueError("Poisson rate function returns wrong value type!")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment