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
The iterator returned by ts.variant gives copies by default. tsk_variant_restricted_copy doesn't copy the samples. I think when copy was written (in March) it wasn't expected that the Python class would have a property to get the samples (in June), and they weren't needed as variant copies can not be decoded to a new site. As variant->samples is NULL on the copy Python crashes as it tries to build a numpy array.
Although tests were added when copy was added in 48c16df when the samples accessor was added in b97c6f1 there were no tests of the combination of copy.samples.
The fix here is to copy the samples in tsk_variant_restricted_copy, which sadly will make it a bit slower.
I'll do that tomorrow (and add the missing tests) with a fresh head and get out a point release.
This segfaults for me, and I think it does on CI too.
The text was updated successfully, but these errors were encountered: