Skip to content

Commit a010211

Browse files
committed
fix adaptive k None
1 parent cd73658 commit a010211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphtools/graphs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ def _weight_knn(self, sample_size=None):
942942
elif self.adaptive_k == 'sqrt':
943943
# the samples are sqrt'd first, then smallest has k
944944
knn_weight = np.sqrt(self.n_cells / np.min(self.n_cells))
945-
elif self.adaptive_k == 'none':
945+
elif self.adaptive_k is None:
946946
knn_weight = np.repeat(1, len(self.n_cells))
947947
weighted_knn = np.round(self.knn * knn_weight).astype(np.int32)
948948
if len(weighted_knn) == 1:

0 commit comments

Comments
 (0)