Skip to content

Commit b36e573

Browse files
committed
check for inputs first
1 parent 7b39d7a commit b36e573

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pymc/data.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,12 @@ def first_inputs(r):
153153
if not r.owner:
154154
return
155155

156-
first_input = r.owner.inputs[0]
156+
inputs = r.owner.inputs
157+
158+
if not inputs:
159+
return
160+
161+
first_input = inputs[0]
157162
yield first_input
158163
yield from first_inputs(first_input)
159164

0 commit comments

Comments
 (0)