Initially, I thought the problem is the function multivariatenormal
return pm.MvNormal.dist(mu, cov) if dist else pm.MvNormal('mvn' + suffix, mu, cov) where a shape should be explicitly specified. But running the code it turns out it is not the case. The problem is that the Mixture is trying to compute a mode by evaluating the logp, but did not catch the wrong shape in the mode. For now, wrap the mixture logp as a DensityDist or a Potential should allow you to continue with the sampling etc.
f…
I just tried with the code above and it runs fine - are you using the same data generation process as in the notebook from Austin Rochford? GMM Metropolis Possible Bug · GitHub
Also, here is a more recent example: https://github.com/junpenglao/Planet_Sakaar_Data_Science/blob/master/WIP/[WIP]%20Bayesian%20GMM.ipynb