56aba98eb5d8e1402125fe36a92c48306e2a0322,pymc3/tests/test_quadpotential.py,,test_equal_diag,#,50

Before Change


        e = x_.dot(np.diag(1. / diag).dot(x_)) / 2
        for pot in pots:
            v_function = theano.function([x], pot.velocity(x))
            e_function = theano.function([x], pot.energy(x))
            assert np.allclose(v_function(x_), v)
            assert np.allclose(e_function(x_), e)

After Change



        v = np.diag(1. / diag).dot(x)
        e = x.dot(np.diag(1. / diag).dot(x)) / 2
        for pot in pots:
            v_ = pot.velocity(x)
            e_ = pot.energy(x)
            npt.assert_allclose(v_, v)
            npt.assert_allclose(e_, e)


def test_equal_dense():
    np.random.seed(42)
    for _ in range(3):
        cov = np.random.rand(5, 5)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pymc-devs/pymc3
Commit Name: 56aba98eb5d8e1402125fe36a92c48306e2a0322
Time: 2017-07-19
Author: adrian.seyboldt@gmail.com
File Name: pymc3/tests/test_quadpotential.py
Class Name:
Method Name: test_equal_diag


Project Name: pymc-devs/pymc3
Commit Name: 56aba98eb5d8e1402125fe36a92c48306e2a0322
Time: 2017-07-19
Author: adrian.seyboldt@gmail.com
File Name: pymc3/tests/test_quadpotential.py
Class Name:
Method Name: test_equal_dense


Project Name: keras-team/keras
Commit Name: a18932cb658c012808dd78bbd7f5bf1fe712e6c9
Time: 2016-01-15
Author: francois.chollet@gmail.com
File Name: examples/neural_style_transfer.py
Class Name:
Method Name: