From 5f96c01137784372d5cbb8ef19d92b6b2202bed3 Mon Sep 17 00:00:00 2001 From: Yan Wong Date: Sat, 14 Nov 2026 12:35:17 +0000 Subject: [PATCH 1/2] Update docs to correct description of length (not proportion) returned Fixes https://github.com/tskit-dev/tscompare/issues/45 --- tscompare/methods.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tscompare/methods.py b/tscompare/methods.py index 263e929..619c465 100644 --- a/tscompare/methods.py +++ b/tscompare/methods.py @@ -278,12 +278,15 @@ def match_node_ages(ts, other): Returns a tuple of three vectors of length `ts.num_nodes`, in this order: the age of the best matching node in `other`; - the proportion of the node span in `ts` that is covered by the best match; + the shared span with the best match, in sequence-length units; and the node id of the best match in `other`. + To obtain the proportion of the node span in `ts` that is covered by the + best match, divide the shared span by the corresponding value from + :func:`.node_spans` (using ``include_missing=True``). :return: A tuple of arrays of length `ts.num_nodes` containing - (time of matching node, proportion overlap, and node ID of match). + (time of matching node, shared span, and node ID of match). """ shared_spans = shared_node_spans(ts, other) From cfe1f8e9a0fcc9255ec749efdb7ebce41f9abf03 Mon Sep 17 00:00:00 2001 From: Peter Ralph Date: Sun, 15 Nov 2026 09:48:24 -0800 Subject: [PATCH 2/2] Update tscompare/methods.py --- tscompare/methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tscompare/methods.py b/tscompare/methods.py index 619c465..623c1e8 100644 --- a/tscompare/methods.py +++ b/tscompare/methods.py @@ -278,7 +278,7 @@ def match_node_ages(ts, other): Returns a tuple of three vectors of length `ts.num_nodes`, in this order: the age of the best matching node in `other`; - the shared span with the best match, in sequence-length units; + the shared span with the best match, in units of sequence length; and the node id of the best match in `other`. To obtain the proportion of the node span in `ts` that is covered by the