From c619b58829d2745ade58c5b5ae552d3148694b0b Mon Sep 17 00:00:00 2001 From: Caroline Malin-Mayor Date: Thu, 26 Sep 2024 18:38:29 -0400 Subject: [PATCH] Add a __str__ function to the TrackGraph with num nodes and edges --- motile/track_graph.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/motile/track_graph.py b/motile/track_graph.py index b0b1cdc..6939e9a 100644 --- a/motile/track_graph.py +++ b/motile/track_graph.py @@ -272,3 +272,6 @@ def _update_metadata(self) -> None: self.t_end = max(frames) + 1 self._graph_changed = False + + def __str__(self) -> str: + return f"TrackGraph({len(self.nodes)} nodes, {len(self.edges)} edges)"