pymc3/step_methods/hmc/integration.py

Killed 26 out of 29 mutants

Timeouts

Mutants that made the test suite take a lot longer so the tests were killed.

Mutant 628

--- pymc3/step_methods/hmc/integration.py
+++ pymc3/step_methods/hmc/integration.py
@@ -87,7 +87,7 @@
         v_new = np.empty_like(q_new)
         q_new_grad = np.empty_like(q_new)
 
-        dt = 0.5 * epsilon
+        dt = 1.5 * epsilon
 
         # p is already stored in p_new
         # p_new = p + dt * q_grad

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 606

--- pymc3/step_methods/hmc/integration.py
+++ pymc3/step_methods/hmc/integration.py
@@ -18,7 +18,7 @@
 from scipy import linalg
 
 
-State = namedtuple("State", 'q, p, v, q_grad, energy, model_logp')
+State = namedtuple("XXStateXX", 'q, p, v, q_grad, energy, model_logp')
 
 
 class IntegrationError(RuntimeError):

Mutant 615

--- pymc3/step_methods/hmc/integration.py
+++ pymc3/step_methods/hmc/integration.py
@@ -38,7 +38,7 @@
 
     def compute_state(self, q, p):
         """Compute Hamiltonian functions using a position and momentum."""
-        if q.dtype != self._dtype or p.dtype != self._dtype:
+        if q.dtype != self._dtype and p.dtype != self._dtype:
             raise ValueError('Invalid dtype. Must be %s' % self._dtype)
         logp, dlogp = self._logp_dlogp_func(q)
         v = self._potential.velocity(p)