File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1372,6 +1372,7 @@ def saturate(
13721372 * ,
13731373 expr : Expr | None = None ,
13741374 max : int = 1000 ,
1375+ visualize : bool = True ,
13751376 ** kwargs : Unpack [GraphvizKwargs ],
13761377 ) -> None :
13771378 """
@@ -1387,12 +1388,15 @@ def to_json() -> str:
13871388 print (self .extract (expr ), "\n " )
13881389 return self ._serialize (** kwargs ).to_json ()
13891390
1390- egraphs = [to_json ()]
1391+ if visualize :
1392+ egraphs = [to_json ()]
13911393 i = 0
13921394 while self .run (schedule or 1 ).updated and i < max :
13931395 i += 1
1394- egraphs .append (to_json ())
1395- VisualizerWidget (egraphs = egraphs ).display_or_open ()
1396+ if visualize :
1397+ egraphs .append (to_json ())
1398+ if visualize :
1399+ VisualizerWidget (egraphs = egraphs ).display_or_open ()
13961400
13971401 @classmethod
13981402 def current (cls ) -> EGraph :
You can’t perform that action at this time.
0 commit comments