On Line 516 of coalescent.py, I think pop_size=default_pop_size should be pop_size=pop_size. Here's some context (Lines 509-518):
if edge_pop_size_attr and hasattr(edge, edge_pop_size_attr):
pop_size = getattr(edge, edge_pop_size_attr)
else:
pop_size = default_pop_size
if edge.head_node.parent_node is None:
if len(pop_node_genes[edge.head_node]) > 1:
final = coalesce_nodes(nodes=pop_node_genes[edge.head_node],
pop_size=default_pop_size,
period=None,
rng=rng)
Currently, the default population size is always used for the root edge, even if a different size is given as an attribute of the root edge.
On Line 516 of coalescent.py, I think
pop_size=default_pop_size
should bepop_size=pop_size
. Here's some context (Lines 509-518):Currently, the default population size is always used for the root edge, even if a different size is given as an attribute of the root edge.