88cd16a4e3c70d82567c96c1ffc277ef8ea87a3f,pymc3/tests/test_hmc.py,,test_leapfrog_reversible,#,14

Before Change



            q, p = q0, p0
            q, p, _ = step.leapfrog(q, p, floatX(np.array(epsilon)), np.array(n_steps, dtype="int32"))
            q, p, _ = step.leapfrog(q, -p, floatX(np.array(epsilon)), np.array(n_steps, dtype="int32"))
            close_to(q, q0, precision, str((n_steps, epsilon)))
            close_to(-p, p0, precision, str((n_steps, epsilon)))

@pytest.mark.xfail(condition=(theano.config.floatX == "float32"), reason="Fails on float32")

After Change


        for n_steps in [1, 2, 3, 4, 20]:
            state = start
            for _ in range(n_steps):
                state = step.integrator.step(epsilon, state)
            for _ in range(n_steps):
                state = step.integrator.step(-epsilon, state)
            close_to(state.q, start.q, precision, str((n_steps, epsilon)))
            close_to(state.p, start.p, precision, str((n_steps, epsilon)))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pymc-devs/pymc3
Commit Name: 88cd16a4e3c70d82567c96c1ffc277ef8ea87a3f
Time: 2017-07-18
Author: adrian.seyboldt@gmail.com
File Name: pymc3/tests/test_hmc.py
Class Name:
Method Name: test_leapfrog_reversible


Project Name: pymc-devs/pymc3
Commit Name: 88cd16a4e3c70d82567c96c1ffc277ef8ea87a3f
Time: 2017-07-18
Author: adrian.seyboldt@gmail.com
File Name: pymc3/step_methods/hmc/hmc.py
Class Name: HamiltonianMC
Method Name: astep


Project Name: pymc-devs/pymc3
Commit Name: fac28fa4a571ff70272ff77b217dd109494f0e71
Time: 2017-07-16
Author: adrian.seyboldt@gmail.com
File Name: pymc3/step_methods/hmc/nuts.py
Class Name: _Tree
Method Name: _single_step