Mercurial > pylearn
changeset 1264:34512d1d4e9c
hmc - modified get_position to return shared var copy
author | James Bergstra <bergstrj@iro.umontreal.ca> |
---|---|
date | Wed, 01 Sep 2010 17:39:39 -0400 |
parents | 10113a1050ce |
children | d6665a5af743 |
files | pylearn/sampling/hmc.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pylearn/sampling/hmc.py Tue Sep 28 16:27:21 2010 -0400 +++ b/pylearn/sampling/hmc.py Wed Sep 01 17:39:39 2010 -0400 @@ -190,7 +190,7 @@ # see `draw()` or `get_position` for that behaviour. def get_position(self): - return [q.value for q in self.positions] + return [q.value.copy() for q in self.positions] def draw(self, n_steps=None): """Return the current sample in the Markov chain as a list of numpy arrays