Skip to content

Commit

Permalink
fix adaptive k None
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgigante committed Jul 31, 2018
1 parent cd73658 commit a010211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphtools/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a010211

Please sign in to comment.