File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 107107from warnings import warn
108108
109109from scipy .cluster .hierarchy import linkage , leaves_list
110+ from scipy .spatial .distance import squareform
110111import numpy as np
111112
112113import nimfa
@@ -170,7 +171,7 @@ def reorder(C):
170171 :type C: `numpy.ndarray`
171172 """
172173 Y = 1 - C
173- Z = linkage (Y , method = 'average' )
174+ Z = linkage (squareform ( Y ) , method = 'average' )
174175 ivl = leaves_list (Z )
175176 ivl = ivl [::- 1 ]
176177 return C [:, ivl ][ivl , :]
Original file line number Diff line number Diff line change 9898from warnings import warn
9999
100100from scipy .cluster .hierarchy import linkage , leaves_list
101+ from scipy .spatial .distance import squareform
101102import numpy as np
102103
103104import nimfa
@@ -160,7 +161,7 @@ def reorder(C):
160161 :type C: `numpy.ndarray`
161162 """
162163 Y = 1 - C
163- Z = linkage (Y , method = 'average' )
164+ Z = linkage (squareform ( Y ) , method = 'average' )
164165 ivl = leaves_list (Z )
165166 ivl = ivl [::- 1 ]
166167 return C [:, ivl ][ivl , :]
You can’t perform that action at this time.
0 commit comments