Skip to content

Commit 349c6cd

Browse files
author
Chris Fonnesbeck
committed
Updated slice competence with has_grad condition
1 parent fd0ec13 commit 349c6cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pymc3/step_methods/slicer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,5 +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 has_grad and (var.shape is None or var.shape.ndim == 1):
101+
return Competence.PREFERRED
100102
return Competence.COMPATIBLE
101103
return Competence.INCOMPATIBLE
104+

0 commit comments

Comments
 (0)