Skip to content
Snippets Groups Projects
Commit ad77b6d5 authored by moritz's avatar moritz
Browse files

Moritz Huebner: Rewrote the initialise_parameters function to get rid of a dictionary call

parent 274c7701
No related branches found
No related tags found
1 merge request!13Source reimplementation
......@@ -97,7 +97,13 @@ class Sampler:
def initialise_parameters(self):
self.fixed_parameters = self.prior.copy()
self.search_parameter_keys = []
for key in self.likelihood.source:
for key in dir(self.likelihood.source):
if key.startswith('__'):
continue
if key == 'copy':
continue
if key in self.prior:
p = self.prior[key]
CA = isinstance(p, numbers.Real)
......
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