Skip to content

Commit eace7f6

Browse files
Add kwargs to aesara.graph.basic.clone_get_equiv
This allows one to specify the options passed to `Apply.clone_with_new_inputs`.
1 parent 65a69cb commit eace7f6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

aesara/graph/basic.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,7 @@ def clone_get_equiv(
10691069
Dict[Union[Apply, Variable, "Op"], Union[Apply, Variable, "Op"]]
10701070
] = None,
10711071
clone_inner_graphs: bool = False,
1072+
**kwargs,
10721073
) -> Dict[Union[Apply, Variable, "Op"], Union[Apply, Variable, "Op"]]:
10731074
r"""Clone the graph between `inputs` and `outputs` and return a map of the cloned objects.
10741075
@@ -1099,6 +1100,8 @@ def clone_get_equiv(
10991100
dictionary and return it.
11001101
clone_inner_graphs
11011102
If ``True``, clone `HasInnerGraph` `Op`\s and their inner-graphs.
1103+
kwargs
1104+
Keywords passed to `Apply.clone_with_new_inputs`.
11021105
11031106
"""
11041107
if memo is None:
@@ -1124,7 +1127,9 @@ def clone_get_equiv(
11241127
else:
11251128
memo[input] = input
11261129

1127-
clone_node_and_cache(apply, memo, clone_inner_graphs=clone_inner_graphs)
1130+
clone_node_and_cache(
1131+
apply, memo, clone_inner_graphs=clone_inner_graphs, **kwargs
1132+
)
11281133

11291134
# finish up by cloning any remaining outputs (it can happen)
11301135
for output in outputs:

0 commit comments

Comments
 (0)