Commit adc873ad authored by Moritz Huebner's avatar Moritz Huebner

Merge branch 'prior-normalization-cache' into 'master'

Prior normalization cache

See merge request lscsoft/bilby!914
parents 66603473 c1690a08
......@@ -390,6 +390,7 @@ class PriorDict(dict):
samples = self.sample_subset(keys=keys, size=sampling_chunk)
keep = np.atleast_1d(self.evaluate_constraints(samples))
if len(keep) == 1:
self._cached_normalizations[keys] = 1
return 1
all_samples = {key: np.array([]) for key in keys}
while np.count_nonzero(keep) < min_accept:
......
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