From 069f6d9610a055fcb1bbb99881723911c85ca461 Mon Sep 17 00:00:00 2001 From: BadPrograms Date: Wed, 7 Jan 2026 13:34:32 +0100 Subject: [PATCH 1/2] . --- src/lineagetree/measure/spatial.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lineagetree/measure/spatial.py b/src/lineagetree/measure/spatial.py index 3d62081..2ab5dcf 100644 --- a/src/lineagetree/measure/spatial.py +++ b/src/lineagetree/measure/spatial.py @@ -70,7 +70,7 @@ def get_gabriel_graph(lT: LineageTree, t: int) -> dict[int, set[int]]: if not hasattr(lT, "Gabriel_graph"): lT.Gabriel_graph = {} - if t not in lT.Gabriel_graph: + if lT.time_nodes[t] - lT.Gabriel_graph.keys() != 0: _, nodes = lT.get_idx3d(t) data_corres = {} @@ -106,9 +106,9 @@ def get_gabriel_graph(lT: LineageTree, t: int) -> dict[int, set[int]]: data_corres[e1] ) - lT.Gabriel_graph[t] = Gabriel_graph + lT.Gabriel_graph.update(Gabriel_graph) - return lT.Gabriel_graph[t] + return lT.Gabriel_graph def compute_neighbours_in_radius( From 7191355471d3ca00c3c7c6c675bb15969351bcb7 Mon Sep 17 00:00:00 2001 From: BadPrograms Date: Wed, 7 Jan 2026 13:45:35 +0100 Subject: [PATCH 2/2] fix --- src/lineagetree/measure/spatial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lineagetree/measure/spatial.py b/src/lineagetree/measure/spatial.py index 2ab5dcf..c74b55c 100644 --- a/src/lineagetree/measure/spatial.py +++ b/src/lineagetree/measure/spatial.py @@ -70,7 +70,7 @@ def get_gabriel_graph(lT: LineageTree, t: int) -> dict[int, set[int]]: if not hasattr(lT, "Gabriel_graph"): lT.Gabriel_graph = {} - if lT.time_nodes[t] - lT.Gabriel_graph.keys() != 0: + if lT.time_nodes[t] - lT.Gabriel_graph.keys(): _, nodes = lT.get_idx3d(t) data_corres = {}