mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
split chain with parentheses for and node
This commit is contained in:
parent
9e96911771
commit
7499a7004e
1 changed files with 1 additions and 1 deletions
|
|
@ -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) * ')'
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue