pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

Fail to run the example of disaster_model_gof.py #138

Closed Jiaxing-Wang closed 6 years ago

Jiaxing-Wang commented 7 years ago

C:\Python35\Lib\site-packages\pymc\examples>disaster_model_gof.py Tuning at iteration 1000 Metropolis_early_mean tuning: value: 3.1465613898723426 acceptance rate: 0.567 adaptive scale factor: 1.1

Traceback (most recent call last): File "C:\Python35\Lib\site-packages\pymc\examples\disaster_model_gof.py", line 82, in M.sample(10000, burn=5000, verbose=2) File "C:\Python35\lib\site-packages\pymc\MCMC.py", line 279, in sample Sampler.sample(self, iter, length, verbose) File "C:\Python35\lib\site-packages\pymc\Model.py", line 251, in sample self._loop() File "C:\Python35\lib\site-packages\pymc\MCMC.py", line 294, in _loop self.tune() File "C:\Python35\lib\site-packages\pymc\MCMC.py", line 361, in tune '\t\tTuning step method %s, returned %i\n' %i NameError: name 'i' is not defined

Why is there a 'NameError' when I run the example disaster_model_gof.py?

fonnesbeck commented 7 years ago

Are you running a release version? I believe this is fixed in master. Can you try building from there?