def prior_logZ(gmm_natparam): dirichlet_natparam, niw_natparams = gmm_natparam return dirichlet.logZ(dirichlet_natparam) + niw.logZ(niw_natparams)