mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
split chain with parentheses for and node
This commit is contained in:
@@ -287,5 +287,5 @@ render_python: Dict[Type, Callable] = {
|
||||
ModNode: lambda self,ops,ctx: f"({self.a.render(ops,ctx)}%{self.b})",
|
||||
LtNode: lambda self,ops,ctx: f"({self.a.render(ops,ctx)}<{sym_render(self.b,ops,ctx)})",
|
||||
SumNode: lambda self,ops,ctx: f"({'+'.join(sorted([x.render(ops,ctx) for x in self.nodes]))})",
|
||||
AndNode: lambda self,ops,ctx: f"({' and '.join(sorted([x.render(ops,ctx) for x in self.nodes]))})"
|
||||
AndNode: lambda self,ops,ctx: ' and '.join(sorted([f"({x.render(ops, ctx)}" for x in self.nodes])) + len(self.nodes) * ')'
|
||||
}
|
||||
Reference in New Issue
Block a user