Fst gives a NoneType error when no indices are given (the default)
See original GitHub issueI have a simulation that does the right thing when I explicitly specify pairs of indices:
ts.Fst(sample_sets = samples_list,
indexes = [(0,2), (0,1)])
outputs
array([[0.12508121, 0.12780193]])
but that gives the following error if I remove the indexes
input (and so use the default value of None
)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-fbfb01290311> in <module>
----> 1 ts.Fst(sample_sets = samples_list)
/usr/local/lib/python3.7/site-packages/tskit/trees.py in Fst(self, sample_sets, indexes, windows, mode, span_normalise)
3332 fst = np.repeat(1.0, np.product(divergences.shape))
3333 fst.shape = divergences.shape
-> 3334 for i, (u, v) in enumerate(indexes):
3335 denom = (diversities[:, :, u] + diversities[:, :, v]
3336 + 2 * divergences[:, :, i])
TypeError: 'NoneType' object is not iterable
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Implement pairwise Fst · Issue #199 · tskit-dev/tskit - GitHub
Having thought some more about the two alternative Fst ... Fst gives a NoneType error when no indices are given (the default) #250....
Read more >az servicebus list gives NoneType error in python
Command Name I tried az servicebus namespace list but after some outputs it gives me NoneType error means no data is retrieved.
Read more >OpenCV: Resolving NoneType errors - PyImageSearch
When using OpenCV and Python together you'll inevitably run into NoneType errors. Here's how to resolve them.
Read more >Automatic IDs, None Defaults, and Refreshing Data - SQLModel
Now let's talk a bit about why the id field can't be NULL on the database because it's a primary key, and we...
Read more >Lesson 2 : Error while executing batches, preds ... - Fast.ai forums
I was able to run vgg.test without any hassl… ... So I gave my testpath as below ... I get 0 images found...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Whoops; missed this. Let’s discuss at #315 .
I’ve had a change of heart here, and think maybe we should hold off on specifying a default for this—see the comment in #313