Skip to content

Commit 6d15a19

Browse files
authored
Merge pull request #322 from tskit-dev/hyanwong-patch-3
Change metadata for new site in example code
2 parents 29c26a9 + 68d7e72 commit 6d15a19

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tables_and_editing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ It is also easy to add more rows:
505505
```{code-cell} ipython3
506506
new_pos = 10
507507
new_site_id = new_tables.sites.add_row(
508-
position=new_pos, ancestral_state="G", metadata=b"An empty site"
509-
# NB: For this example table we have to feed a raw byte string as metadata
508+
position=new_pos, ancestral_state="G", metadata=b"A new site"
509+
# NB: This site table has no scheme, so metadata must be a raw byte string
510510
)
511511
print(f"New empty site allocated at position {new_pos} with ID {new_site_id}")
512512
new_tables.sites

0 commit comments

Comments
 (0)