Skip to content

Commit ed84d2d

Browse files
committed
Don't use dataclasses
1 parent 0b9db27 commit ed84d2d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

data_structures.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,6 @@ the modified tables. In the following example, we use this
460460
approach to remove all singleton sites from a given tree sequence.
461461

462462
```{code-cell} ipython3
463-
import dataclasses
464463
def strip_singletons(ts):
465464
tables = ts.dump_tables()
466465
tables.sites.clear()
@@ -471,7 +470,7 @@ def strip_singletons(ts):
471470
mut = site.mutations[0]
472471
if tree.num_samples(mut.node) > 1:
473472
site_id = tables.sites.append(site)
474-
mut = dataclasses.replace(mut, site=site_id) # set the new site id
473+
mut = mut.replace(site=site_id) # set the new site id
475474
tables.mutations.append(mut)
476475
return tables.tree_sequence()
477476
```

0 commit comments

Comments
 (0)