From 8c31d5817d2bfca40edce764e3b09d5d40070da3 Mon Sep 17 00:00:00 2001 From: Scott Gigante Date: Thu, 7 Jun 2018 16:15:40 -0400 Subject: [PATCH 1/2] remove duplicated code --- graphtools/graphs.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/graphtools/graphs.py b/graphtools/graphs.py index 1eed886..81c0080 100644 --- a/graphtools/graphs.py +++ b/graphtools/graphs.py @@ -172,19 +172,7 @@ def build_kernel(self): symmetric matrix with ones down the diagonal with no non-negative entries. """ - if self.decay is None or self.thresh == 1: - # binary connectivity matrix - # sklearn has a function for this - log_start("KNN search") - K = kneighbors_graph(self.knn_tree, - n_neighbors=self.knn, - metric=self.distance, - mode='connectivity', - include_self=True) - log_complete("KNN search") - else: - # sparse fast alpha decay - K = self.build_kernel_to_data(self.data_nu) + K = self.build_kernel_to_data(self.data_nu) # symmetrize K = (K + K.T) / 2 return K From b71444de72b5f048d27da7ed5fc750611187814e Mon Sep 17 00:00:00 2001 From: Scott Gigante Date: Thu, 7 Jun 2018 16:15:46 -0400 Subject: [PATCH 2/2] fix typo --- graphtools/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphtools/api.py b/graphtools/api.py index fc9722b..68c236e 100644 --- a/graphtools/api.py +++ b/graphtools/api.py @@ -201,7 +201,7 @@ def Graph(data, elif len(parent_classes) == 2: class Graph(parent_classes[0], parent_classes[1]): pass - elif len(parent_classes) == 2: + elif len(parent_classes) == 3: class Graph(parent_classes[0], parent_classes[1], parent_classes[2]): pass else: