Skip to content

Commit 90215a8

Browse files
authored
Merge pull request #2798 from pymc-devs/slice_competence
Removed preference for slice sampler for continuous variables
2 parents e300f3a + 349c6cd commit 90215a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pymc3/step_methods/slicer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ def astep(self, q0, logp):
9797
@staticmethod
9898
def competence(var, has_grad):
9999
if var.dtype in continuous_types:
100-
if not var.shape or var.shape.ndim == 1:
100+
if not has_grad and (var.shape is None or var.shape.ndim == 1):
101101
return Competence.PREFERRED
102102
return Competence.COMPATIBLE
103103
return Competence.INCOMPATIBLE
104+

0 commit comments

Comments
 (0)