Skip to content

Commit fd36797

Browse files
Try putting in let binding
1 parent c8cc71e commit fd36797

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/tests/test_array_api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ def _load_py_snapshot(fn: Callable, var: str | None = None) -> Any:
104104

105105

106106
def load_source(expr, egraph: EGraph):
107-
fn_program = egraph.let("fn_program", ndarray_function_two(expr, NDArray.var("X"), NDArray.var("y")))
108-
egraph.run(array_api_program_gen_schedule)
109-
return egraph.eval(egraph.extract(fn_program.statements))
107+
with egraph:
108+
fn_program = egraph.let("fn_program", ndarray_function_two(expr, NDArray.var("X"), NDArray.var("y")))
109+
egraph.run(array_api_program_gen_schedule)
110+
return egraph.eval(egraph.extract(fn_program.statements))
110111

111112

112113
def trace_lda(egraph: EGraph):

0 commit comments

Comments
 (0)