Skip to content
Snippets Groups Projects
Commit adc873ad authored by Moritz Huebner's avatar Moritz Huebner
Browse files

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

Prior normalization cache

See merge request !914
parents 66603473 c1690a08
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
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