Skip to content

Commit 04ebe0a

Browse files
committed
Fix logical flaw in inner_var list appends
1 parent c7d0a54 commit 04ebe0a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pytensor/printing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ def debugprint(
102102
print_view_map: bool = False,
103103
print_memory_map: bool = False,
104104
print_fgraph_inputs: bool = False,
105-
print_inner_graphs: bool = True,
106105
) -> str | TextIO:
107106
r"""Print a graph as text.
108107
@@ -125,6 +124,8 @@ def debugprint(
125124
The object(s) to be printed.
126125
depth
127126
Print graph to this depth (``-1`` for unlimited).
127+
inner_depth
128+
Print inner graph to this depth (``-1`` for unlimited).
128129
print_type
129130
If ``True``, print the `Type`\s of each `Variable` in the graph.
130131
print_shape
@@ -302,7 +303,7 @@ def debugprint(
302303
or hasattr(var.owner.op, "scalar_op")
303304
and isinstance(var.owner.op.scalar_op, HasInnerGraph)
304305
)
305-
and not inner_depth
306+
and inner_depth
306307
and var not in inner_graph_vars
307308
):
308309
inner_graph_vars.append(var)

0 commit comments

Comments
 (0)