pymc3/step_methods/hmc/integration.py

Killed 27 out of 29 mutants

Survived

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

Mutant 490

--- 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 499

--- 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)