diff options
author | Muriithi Frederick Muriuki | 2021-08-17 11:05:03 +0300 |
---|---|---|
committer | Muriithi Frederick Muriuki | 2021-08-17 11:05:03 +0300 |
commit | 99bfda81abe76b3bb3f7034cf6cdac21c8d50726 (patch) | |
tree | 1248bd976ec6792ac62eb8bbb6efd54788f47251 /gn3/computations/slink.py | |
parent | a2f6406909951a80dc4ead809a09e8de2c15200d (diff) | |
download | genenetwork3-99bfda81abe76b3bb3f7034cf6cdac21c8d50726.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/computations/slink.py')
-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: |