https://discourse.pymc.io/t/shape-mismatch-error-in-sample-ppc/2270 The problem is the weight random is incorrect: https://github.com/pymc-devs/pymc3/blob/6d07591962a6c135640a3c31903eba66b34e71d8/pymc3/distributions/mixture.py#L160-L164