def test_mv_t(self): for n in [2, 3]: pymc3_random(MvStudentT, {'nu': Domain([5, 10, 25, 50]), 'Sigma': PdMatrix(n), 'mu':Vector(R,n)}, size=100, valuedomain=Vector(R,n), ref_rand=(lambda nu=None, Sigma=None, mu=None, size=None: mu + np.sqrt(nu) * (st.multivariate_normal.rvs(cov=Sigma, size=size).T / st.chi2.rvs(df=nu, size=size)).T))
def test_mv_normal(self): for n in [2, 3]: pymc3_random(MvNormal, {'mu':Vector(R,n), 'tau': PdMatrix(n)}, size=100, valuedomain=Vector(R,n), ref_rand=lambda mu=None, tau=None, size=None: \ st.multivariate_normal.rvs(mean=mu, cov=tau, size=size))