Skip to content
Snippets Groups Projects
Commit bf84d3af authored by Colm Talbot's avatar Colm Talbot
Browse files

add sampling from prior set

parent 6e9d060c
No related branches found
No related tags found
1 merge request!56General fix up of priors
......@@ -123,6 +123,14 @@ class PriorSet(dict):
for key in self:
test_redundancy(key, self)
def sample(self, size=None):
"""Draw samples from the prior set"""
samples = dict()
for key in self:
if isinstance(self[key], Prior):
samples[key] = self[key].sample(size=size)
return samples
def create_default_prior(name, default_priors_file=None):
"""
......
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