Commit 91d541db authored by Gregory Ashton's avatar Gregory Ashton

Allow for 1D posteriors

parent e5fbc076
......@@ -197,7 +197,11 @@ class Result(dict):
@property
def posterior_volume(self):
""" The posterior volume """
return 1/np.sqrt(np.abs(np.linalg.det(1/self.covariance_matrix/2/np.pi)))
if self.covariance_matrix.ndim == 0:
return np.sqrt(self.covariance_matrix)
else:
return 1/np.sqrt(np.abs(np.linalg.det(
1/self.covariance_matrix)))
def prior_volume(self, priors):
""" The prior volume, given a set of priors """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment