diff --git a/nimfa/examples/all_aml.py b/nimfa/examples/all_aml.py index ba02a87..30d0b3c 100644 --- a/nimfa/examples/all_aml.py +++ b/nimfa/examples/all_aml.py @@ -107,6 +107,7 @@ from warnings import warn from scipy.cluster.hierarchy import linkage, leaves_list +from scipy.spatial.distance import squareform import numpy as np import nimfa @@ -170,7 +171,7 @@ def reorder(C): :type C: `numpy.ndarray` """ Y = 1 - C - Z = linkage(Y, method='average') + Z = linkage(squareform(Y), method='average') ivl = leaves_list(Z) ivl = ivl[::-1] return C[:, ivl][ivl, :] diff --git a/nimfa/examples/medulloblastoma.py b/nimfa/examples/medulloblastoma.py index 3632498..434090f 100644 --- a/nimfa/examples/medulloblastoma.py +++ b/nimfa/examples/medulloblastoma.py @@ -98,6 +98,7 @@ from warnings import warn from scipy.cluster.hierarchy import linkage, leaves_list +from scipy.spatial.distance import squareform import numpy as np import nimfa @@ -160,7 +161,7 @@ def reorder(C): :type C: `numpy.ndarray` """ Y = 1 - C - Z = linkage(Y, method='average') + Z = linkage(squareform(Y), method='average') ivl = leaves_list(Z) ivl = ivl[::-1] return C[:, ivl][ivl, :]