Skip to content
Snippets Groups Projects
Commit ecbc6a74 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Add a ln_prior method to Uniform

parent e1df746c
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -635,6 +635,20 @@ class Uniform(Prior):
return scipy.stats.uniform.pdf(val, loc=self.minimum,
scale=self.maximum-self.minimum)
def ln_prob(self, val):
"""Return the log prior probability of val
Parameters
----------
val: float
Returns
-------
float: log probability of val
"""
return scipy.stats.uniform.logpdf(val, loc=self.minimum,
scale=self.maximum-self.minimum)
class LogUniform(PowerLaw):
......
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