From e05a1d6113d3e4bec803e8b61812119f83eedc01 Mon Sep 17 00:00:00 2001 From: gswangg <152219575+greg-niemeyer@users.noreply.github.com> Date: Sat, 10 Aug 2024 16:28:31 -0400 Subject: [PATCH] string -> fstring (#6028) --- tinygrad/renderer/cstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/renderer/cstyle.py b/tinygrad/renderer/cstyle.py index 5e14d5c082..f26d0e1950 100644 --- a/tinygrad/renderer/cstyle.py +++ b/tinygrad/renderer/cstyle.py @@ -45,7 +45,7 @@ class CStyleLanguage(Renderer): # returns a str expression of the const with the given type def render_const(self, x:ConstType, dtype:DType) -> str: - assert dtype.count == 1, "consts should be scalar, got {dtype}" + assert dtype.count == 1, f"consts should be scalar, got {dtype}" if math.isnan(x): val = "NAN" elif math.isinf(x): val = ("-" if x < 0 else "") + "INFINITY" elif dtype == dtypes.bool: val = "1" if x else "0"