CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.67k stars 7.86k forks source link

running Ch1_Introduction_PyMC3, and get: TypeError: expected type_num 3 (NPY_INT16) got 9 #366

Open cloudsurging opened 6 years ago

cloudsurging commented 6 years ago

Hi,

I am running Ch1_Introduction_PyMC3 and the program runs smoothly until:

with model: step = pm.Metropolis() trace = pm.sample(10000, tune=5000,step=step)

the exception thrown out was:

TypeError Traceback (most recent call last) C:\ProgramData\Anaconda3\lib\site-packages\theano\compile\function_module.py in call(self, *args, **kwargs) 902 outputs =\ --> 903 self.fn() if output_subset is None else\ 904 self.fn(output_subset=output_subset)

TypeError: expected type_num 3 (NPY_INT16) got 9

During handling of the above exception, another exception occurred:

TypeError Traceback (most recent call last)

in () 2 with model: 3 step = pm.Metropolis() ----> 4 trace = pm.sample(10000, tune=5000,step=step) Could you please help us identify how to fix this issue?