Closed hyanwong closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 89.79%. Comparing base (
f955bae
) to head (2c28923
).
Nice, that's a really handy snippet.
Thanks ❤️ Fixed my typo & changed your suggestion. Should be OK to merge.
I'm always wanting to do this and forgetting the most efficient method (for instance, https://github.com/tskit-dev/tskit/discussions/2524#discussioncomment-3757002 does so via an inefficient sort). I think adding this code snippet should be generally useful. Since it's in the docs for the TableCollection method, I don't worry about bloating the documentation, which is mostly contained in the TreeSequence version.