Skip to content

Commit

Permalink
check for inputs first
Browse files Browse the repository at this point in the history
  • Loading branch information
wd60622 committed Jan 24, 2025
1 parent 7b39d7a commit b36e573
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pymc/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ def first_inputs(r):
if not r.owner:
return

first_input = r.owner.inputs[0]
inputs = r.owner.inputs

if not inputs:
return

first_input = inputs[0]
yield first_input
yield from first_inputs(first_input)

Expand Down

0 comments on commit b36e573

Please sign in to comment.