diff --git a/src/pystencils_autodiff/framework_integration/astnodes.py b/src/pystencils_autodiff/framework_integration/astnodes.py index 05ebb09a195647b9e8720e9b0698c8be901f8655..99064e658f951a6bcd9aa7987bcbc31257faec27 100644 --- a/src/pystencils_autodiff/framework_integration/astnodes.py +++ b/src/pystencils_autodiff/framework_integration/astnodes.py @@ -253,7 +253,10 @@ class JinjaCppFile(Node): assert self.TEMPLATE, f"Template of {self.__class__} must be set" render_dict = {k: (self._print(v) if not isinstance(v, (pystencils.Field, pystencils.TypedSymbol)) else v) if not isinstance(v, Iterable) or isinstance(v, str) - else [(self._print(a) if not isinstance(a, (pystencils.Field, pystencils.TypedSymbol)) else a) for a in v] + else [(self._print(a) + if not isinstance(a, (pystencils.Field, pystencils.TypedSymbol)) + else a) + for a in v] for k, v in self.ast_dict.items()} render_dict.update({"headers": pystencils.backends.cbackend.get_headers(self)}) render_dict.update({"globals": pystencils.backends.cbackend.get_global_declarations(self)})