pymc-devs/pymc — pull request #76 by borisaqua (2011-12-22 01:04:16+00:00)
Title: Fixed "Metropolis has no proposal_sd" bug

In case when proposal_distribution is 'Prior', proposal_sd is never set, leading to the following error:

Warning, unable to save state.
Error message:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pymc/Model.py", line 599, in save_state
self.db.savestate(self.get_state())
File "/usr/local/lib/python2.7/dist-packages/pymc/MCMC.py", line 344, in get_state
state['step_methods'][sm._id] = sm.current_state().copy()
File "/usr/local/lib/python2.7/dist-packages/pymc/StepMethods.py", line 293, in current_state
state[s] = getattr(self, s)
AttributeError: 'Metropolis' object has no attribute 'proposal_sd'