tskit-dev / pyslim

Tools for dealing with tree sequences coming to and from SLiM.
MIT License
27 stars 23 forks source link

`unique_labels_by_group` returns False for unused groups #240

Closed petrelharp closed 2 years ago

petrelharp commented 2 years ago

For instance:

>>> pyslim.unique_labels_by_group(
...   group=np.array([1, 1, 4], dtype='int'), label=np.array([2, 2, 2], dtype='int')
... )
array([False,  True, False, False,  True])

The labels in groups 0, 2, and 3 are unique (there are no labels). This creates spurious errors when some individuals have no nodes.

petrelharp commented 2 years ago

I'm going to remove uinque_labels_by_group - it's no longer needed. Edit: It is used, in individual_parents.