We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c4d66c commit 4077c47Copy full SHA for 4077c47
pytensor/graph/basic.py
@@ -1615,8 +1615,8 @@ def expand(o: Apply) -> List[Apply]:
1615
)
1616
1617
1618
-def is_in_ancestors(l_apply: Apply, f_node: Apply) -> bool:
1619
- """Determine if `f_node` is in the graph given by `l_apply`.
+def is_in_ancestors(l_apply: Apply, f_apply: Apply) -> bool:
+ """Determine if `f_apply` is in the graph given by `l_apply`.
1620
1621
Parameters
1622
----------
@@ -1638,7 +1638,7 @@ def is_in_ancestors(l_apply: Apply, f_node: Apply) -> bool:
1638
continue
1639
if all(i in computed or i.owner is None for i in cur.inputs):
1640
computed.update(cur.outputs)
1641
- if cur is f_node:
+ if cur is f_apply:
1642
return True
1643
else:
1644
todo.append(cur)
0 commit comments