Skip to content
Snippets Groups Projects

Resolve #463 (Prior Constraints "Simple Example" not working)

Merged Resolve #463 (Prior Constraints "Simple Example" not working)
All threads resolved!
Merged Bruce Edelman requested to merge bruce.edelman/bilby:example_fix into master
All threads resolved!
1 file
+ 6
0
Compare changes
  • Side-by-side
  • Inline
+ 6
0
@@ -364,6 +364,12 @@ class PriorDict(dict):
return sample
else:
needed = np.prod(size)
constraint_keys = list()
for ii, key in enumerate(keys[-1::-1]):
if isinstance(self[key], Constraint):
constraint_keys.append(-ii - 1)
for ii in constraint_keys[-1::-1]:
del keys[ii]
all_samples = {key: np.array([]) for key in keys}
_first_key = list(all_samples.keys())[0]
while len(all_samples[_first_key]) < needed:
Loading