-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
Python APIIssue is about the Python APIIssue is about the Python APIenhancementNew feature or requestNew feature or request
Milestone
Description
It'd be nice to do e.g.
ts.samples("popA")
where "popA" is the name of a population, rather than the index.
Currently we end up doing things like this:
pop_names = [p.metadata['name'] for p in ts.populations()]
sample_sets = [ts.samples(pop_names.index(n)) for n in ["popA", "popB"]]
ts.divergence(
sample_sets,
indexes=[(0, 0), (0, 1), (1, 1)]
)
However, this does mean that name is maybe "no longer metadata" since we're using it...
grahamgower
Metadata
Metadata
Assignees
Labels
Python APIIssue is about the Python APIIssue is about the Python APIenhancementNew feature or requestNew feature or request