Skip to content
Snippets Groups Projects
Commit a46ce88c authored by Bruce Edelman's avatar Bruce Edelman
Browse files

Revert "remove unnecessary constraint checking:"

This reverts commit ed061424.
parent 37d6cdd2
No related branches found
No related tags found
1 merge request!753Resolve #463 (Prior Constraints "Simple Example" not working)
......@@ -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:
......
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