Skip to content
Snippets Groups Projects
Commit c1690a08 authored by Colm Talbot's avatar Colm Talbot Committed by Moritz Huebner
Browse files

Prior normalization cache

parent 84f35d58
No related branches found
No related tags found
No related merge requests found
......@@ -391,6 +391,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:
......
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