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
recursive_seed_part and recursive_seed_part_inner accept a parameter method which is supposed to be the funciontion used to generate a single district at a give step. However, this method is not passed to recursive_seed_part_inner's recursive calls to itself, meaning it is only used to generate the first district, but not any subsequent one.
It is easy to reproduce and observe this bug by calling recursive_seed_part with a method which has a noticeable side-effect (e.g. logging), and then noticing that that side-effect only occurs once. However, it probably easy to just eye-ball the code to see the problem:
Clearly, method is used exactly once, and will not be used in subsequent calls because it is not passed. Instead, the default of partial(bipartition_tree, max_attempts=10000), will be used.
The text was updated successfully, but these errors were encountered:
recursive_seed_part
andrecursive_seed_part_inner
accept a parametermethod
which is supposed to be the funciontion used to generate a single district at a give step. However, thismethod
is not passed torecursive_seed_part_inner
's recursive calls to itself, meaning it is only used to generate the first district, but not any subsequent one.It is easy to reproduce and observe this bug by calling
recursive_seed_part
with amethod
which has a noticeable side-effect (e.g. logging), and then noticing that that side-effect only occurs once. However, it probably easy to just eye-ball the code to see the problem:GerryChain/gerrychain/tree.py
Lines 524 to 534 in 04ff4f9
GerryChain/gerrychain/tree.py
Lines 591 to 605 in 04ff4f9
GerryChain/gerrychain/tree.py
Lines 621 to 629 in 04ff4f9
Clearly,
method
is used exactly once, and will not be used in subsequent calls because it is not passed. Instead, the default ofpartial(bipartition_tree, max_attempts=10000),
will be used.The text was updated successfully, but these errors were encountered: