# HG changeset patch # User James Bergstra # Date 1283377179 14400 # Node ID 34512d1d4e9c516a3b5776fd73d031cc1d121617 # Parent 10113a1050ce24c25e18fcbe4ae16c9333100c11 hmc - modified get_position to return shared var copy diff -r 10113a1050ce -r 34512d1d4e9c pylearn/sampling/hmc.py --- 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