Skip to content

Commit

Permalink
use tskit.NODE_IS_SAMPLE instead of numerical value (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Nov 9, 2023
1 parent e6cfd9f commit be768ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fwdpy11/tskit_tools/_dump_tables_to_tskit.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ def _dump_tables_to_tskit(
individual = [-1 for i in range(len(node_view))]
for k, v in node_to_individual.items():
individual[k] = v
flags = [1] * 2 * self.N + [0] * (len(node_view) - 2 * self.N)
flags = [tskit.NODE_IS_SAMPLE] * 2 * self.N + [0] * (len(node_view) - 2 * self.N)
# Bug fixed in 0.3.1: add preserved nodes to samples list
for i in np.array(self.ancient_sample_metadata,
copy=False)["nodes"].flatten():
flags[i] = 1
flags[i] = tskit.NODE_IS_SAMPLE
tc.nodes.set_columns(
flags=flags,
time=node_view["time"],
Expand Down

0 comments on commit be768ec

Please sign in to comment.