Shape mismatch error in 'sample_ppc'

Thanks! Do you have any suggestions for hand coding PPC for GMM since I am going to use that for my project?