Skip to content

Commit

Permalink
remove zero bandwidth warning from knngraph
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgigante committed Jul 7, 2019
1 parent b19d150 commit d55694f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions graphtools/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ def build_kernel_to_data(self, Y, knn=None, bandwidth=None,

bandwidth = bandwidth * bandwidth_scale

# check for zero bandwidth
bandwidth = np.maximum(bandwidth, np.finfo(float).eps)

radius = bandwidth * np.power(-1 * np.log(self.thresh),
1 / self.decay)
update_idx = np.argwhere(
Expand Down

0 comments on commit d55694f

Please sign in to comment.