You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I always seem to want to get samples from a tree sequence within a time slice. Although this is not hard to do, I thought more people might be running into this situation and we could add a start_time and end_time argument to TreeSequence.samples(). This could be done just on the Python API end with a simple boolean mask applied on top of the array (the same way we do it for populations), see here.
Let me know if you think this is worth implementing and I can work on a PR.
The text was updated successfully, but these errors were encountered:
I like it! My only hesitancy is about the names of the parameters --- would min_time and max_time be better? "start" and "end" imply a process, but we're not simulating here. max and min have an unambiguous interpretation in terms of the values of the time array.
I always seem to want to get samples from a tree sequence within a time slice. Although this is not hard to do, I thought more people might be running into this situation and we could add a
start_time
andend_time
argument toTreeSequence.samples()
. This could be done just on the Python API end with a simple boolean mask applied on top of the array (the same way we do it for populations), see here.Let me know if you think this is worth implementing and I can work on a PR.
The text was updated successfully, but these errors were encountered: