diff options
author | Muriithi Frederick Muriuki | 2021-08-17 11:05:03 +0300 |
---|---|---|
committer | Arun Isaac | 2021-08-18 08:47:34 +0000 |
commit | d10ee60d2200eefb29a22b0a84cd19569235b354 (patch) | |
tree | 1248bd976ec6792ac62eb8bbb6efd54788f47251 /gn3 | |
parent | 45bc6cbbf1878c9271d410f37e24ad44f5100c2f (diff) | |
download | genenetwork3-d10ee60d2200eefb29a22b0a84cd19569235b354.tar.gz |
Make child sequence a list
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Since the `slink` function assigns values to the `listcopy` variable and its
children, this commit ensures that the sequence is a list to allow for the
assignment.
If the child-sequence is a tuple, that would lead to an exception.
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/computations/slink.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/computations/slink.py b/gn3/computations/slink.py index 5953e6b..3d7a576 100644 --- a/gn3/computations/slink.py +++ b/gn3/computations/slink.py @@ -161,7 +161,7 @@ def slink(lists): try: size = len(lists) listindexcopy = list(range(size)) - listscopy = [child[:] for child in lists] + listscopy = [list(child[:]) for child in lists] init_size = size candidate = [] while init_size > 2: |