From 03db6c2f2dfb2b253ae90c518b6a4937c7e9c8a7 Mon Sep 17 00:00:00 2001 From: Simon Heybrock Date: Thu, 21 Mar 2024 10:18:52 +0100 Subject: [PATCH] More notes --- src/cyclebane/graph.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cyclebane/graph.py b/src/cyclebane/graph.py index 05e9f73..c034733 100644 --- a/src/cyclebane/graph.py +++ b/src/cyclebane/graph.py @@ -283,6 +283,12 @@ class Graph: Scipp). Basically, we would like to use the slicing methods of the underlying object. This may not be trivial, since we might mix different types of array-like objects at nodes with multiple predecessors. + - We could avoid the `indices` attribute on nodes (added by `map`). Instead, lookup + the ancestors and identify mapped source nodes. This will simplify slicing, as + it avoids the need to remove indices on nodes (we only slice the values arrays). + `reduce` would need to add an attribute on which dim to reduce though, so this + may not actually be easier. It might solve the problem of selecting branches + though, which also needs to select a subset of the mapped arrays. """ def __init__(self, graph: nx.DiGraph, *, value_attr: str = 'value'):