From 40394e479ded9c40116554acfff37e52c5537c31 Mon Sep 17 00:00:00 2001 From: Icedoom <9220778+icedoom888@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:50:57 +0100 Subject: [PATCH] Update src/anemoi/graphs/edges/attributes.py Co-authored-by: Mario Santa Cruz <48736305+JPXKQX@users.noreply.github.com> --- src/anemoi/graphs/edges/attributes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/anemoi/graphs/edges/attributes.py b/src/anemoi/graphs/edges/attributes.py index 3d8122e..3c1a21e 100644 --- a/src/anemoi/graphs/edges/attributes.py +++ b/src/anemoi/graphs/edges/attributes.py @@ -202,7 +202,7 @@ def get_raw_values(self, graph: HeteroData, source_name: str, target_name: str) edge_index = graph[(source_name, "to", target_name)].edge_index assert hasattr(graph[node_name], self.node_attr_name) - val = getattr(graph[node_name], self.node_attr_name).numpy()[edge_index[self.idx]] + return graph[node_name][self.node_attr_name].numpy()[edge_index[self.idx]] return val