Collins head finder iterator should be a list instead?
GavinPHR opened this issue · comments
G commented
I noticed some discrepancies between the 2 different traversal orders.
reversed()
on line 108 returns an iterator and if it gets exhausted in the first iteration of the loop on 111, the subsequent result is incorrect.
cort/cort/core/head_finders.py
Lines 107 to 112 in 2349f03
Suggest to change from
to_traverse = reversed(tree)
to
to_traverse = list(reversed(tree) )