def test_basic(self):
    d = 3
    p = density.IsotropicNormal(mean=np.zeros(d), variance=3.0)
    q = density.IsotropicNormal(mean=(np.zeros(d) + 2), variance=3.0)
    k = kernel.KGauss(2.0)
    ds = q.get_datasource()
    n = 97
    dat = ds.sample(n, seed=3)
    witness = gof.SteinWitness(p, k, dat)
    J = 4
    V = (np.random.randn(J, d) * 2)
    evals = witness(V)
    testing.assert_equal(evals.shape, (J, d))
def test_basic(self):
    d = 3
    p = density.IsotropicNormal(mean=np.zeros(d), variance=3.0)
    q = density.IsotropicNormal(mean=(np.zeros(d) + 2), variance=3.0)
    k = kernel.KGauss(2.0)
    ds = q.get_datasource()
    n = 97
    dat = ds.sample(n, seed=3)
    witness = gof.SteinWitness(p, k, dat)
    J = 4
    V = (np.random.randn(J, d) * 2)
    evals = witness(V)
    testing.assert_equal(evals.shape, (J, d))