From a010211ae119c5511a2d1065df542795db889878 Mon Sep 17 00:00:00 2001 From: Scott Gigante Date: Tue, 31 Jul 2018 15:37:47 -0400 Subject: [PATCH] fix adaptive k None --- graphtools/graphs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphtools/graphs.py b/graphtools/graphs.py index fb1b2a3..a6b5974 100644 --- a/graphtools/graphs.py +++ b/graphtools/graphs.py @@ -942,7 +942,7 @@ def _weight_knn(self, sample_size=None): elif self.adaptive_k == 'sqrt': # the samples are sqrt'd first, then smallest has k knn_weight = np.sqrt(self.n_cells / np.min(self.n_cells)) - elif self.adaptive_k == 'none': + elif self.adaptive_k is None: knn_weight = np.repeat(1, len(self.n_cells)) weighted_knn = np.round(self.knn * knn_weight).astype(np.int32) if len(weighted_knn) == 1: