Closed pam-alamilla closed 3 years ago
Hm, interesting - could you post the code that you're running, and the output?
Oh, wait, sorry - you don't need to post the code. individual_parents()
does not take any arguments - doing
ts.individual_parents()
gives you all the parent-child relationships as far as we can tell; there is no option for getting only some of them. And, you're right, it's an issue with the documentation; thanks!!
It would be nice to provide that argument - I must have thought I would implement it, but didn't.
Ah I see, thank you Peter for your quick response. Cheers!
When an array of individual ID’s is passed to the individual_parents() command, the following error appears:
TypeError: individual_parents() takes 1 positional argument but 2 were given
In response, I have attempted to pass NumPy arrays and lists to no avail. However, when the command is used in the default state (all individuals), it works fine.
Is this an issue with the command itself? The documentation states that it should accept ‘The IDs of individuals that parents should be found for’ as a parameter: https://pyslim.readthedocs.io/en/latest/python_api.html?highlight=individual_parents#pyslim.SlimTreeSequence.individual_parents