File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Contains Nexus Manipulation Tools that operate on Site/Characters"""
2- from collections import Counter
3- from collections .abc import Iterable
2+ import collections
43
54from nexus .writer import NexusWriter
65
@@ -21,7 +20,7 @@ def iter_unique_sites(nexus_obj):
2120 (this only really makes sense if the data is coded as presence/absence)
2221 """
2322 for i in range (0 , nexus_obj .data .nchar ):
24- members = Counter ()
23+ members = collections . Counter ()
2524 missing = 0
2625 for taxa , characters in nexus_obj .data :
2726 c = characters [i ]
@@ -167,7 +166,7 @@ def count_binary_set_size(nexus_obj):
167166 2: 20,
168167 }
169168 """
170- tally = Counter ()
169+ tally = collections . Counter ()
171170 for char_id in nexus_obj .data .characters :
172171 char = nexus_obj .data .characters [char_id ]
173172 tally [len ([v for v in char .values () if v == '1' ])] += 1
You can’t perform that action at this time.
0 commit comments