From 26744eab958ceb204a35f1dcbb373dd4bb10da08 Mon Sep 17 00:00:00 2001 From: Luka Macan Date: Wed, 15 Nov 2023 11:15:54 +0100 Subject: [PATCH] Fix nemo creating lists from dimensionless numpy arrays --- dory/Frontend_frameworks/NEMO/Pattern_rewriter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dory/Frontend_frameworks/NEMO/Pattern_rewriter.py b/dory/Frontend_frameworks/NEMO/Pattern_rewriter.py index a63ce8c3..ffc9fe3b 100644 --- a/dory/Frontend_frameworks/NEMO/Pattern_rewriter.py +++ b/dory/Frontend_frameworks/NEMO/Pattern_rewriter.py @@ -167,13 +167,14 @@ def QAdd_pattern_rewriter(self, i): for key, value in self.graph[i[0]].__dict__.items(): if isinstance(value, dict): - inmul1 = value["value"] + inmul1 = int(value["value"]) for key, value in self.graph[i[2]].__dict__.items(): if isinstance(value, dict): - inmul2 = value["value"] + inmul2 = int(value["value"]) for key, value in self.graph[i[3]].__dict__.items(): if isinstance(value, dict): - outshift = (value["value"][0] if isinstance(value["value"].tolist(),list) else value["value"]) + outshift = int((value["value"][0] if isinstance(value["value"].tolist(),list) else value["value"])) + DORY_QAdd_node.inmul1 = {} DORY_QAdd_node.inmul1["value"] = inmul1 DORY_QAdd_node.inmul1["layout"] = ""