Python MCMC implementation