roundtrip error fixed for likelihood tests

This commit is contained in:
Max Zwiessele 2014-02-14 13:43:43 +00:00
parent 0919544eb7
commit f21e8e2394
3 changed files with 10 additions and 11 deletions

View file

@ -154,8 +154,7 @@ class Model(Parameterized):
x = np.random.randn(self.size_transformed)
x = self._untransform_params(x)
# now draw from prior where possible
if self.priors is not None and len(self.priors):
[np.put(x, i, p.rvs(1)) for i, p in enumerate(self.priors) if not p is None]
[np.put(x, ind, p.rvs(ind.size)) for p, ind in self.priors.iteritems() if not p is None]
self._set_params(x)
# self._set_params_transformed(self._get_params_transformed()) # makes sure all of the tied parameters get the same init (since there's only one prior object...)