Skip to content

Commit

Permalink
pep8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gclen committed May 1, 2021
1 parent cc7e2f5 commit b24d9a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions umap/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1589,5 +1589,4 @@ def nearest_neighbour_distribution(umap_object, bins=25, ax=None):

ax.hist(nn_distances, bins=bins)

return ax

return ax
9 changes: 6 additions & 3 deletions umap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ def average_nn_distance(dist_matrix):
averages = sum_non_zero_elems/count_non_zero_elems

if any(np.isnan(averages)):
warn("Embedding contains disconnected vertices which will be ignored. Use umap.utils.disconnected_vertices() to identify them.")

return averages
warn(
"Embedding contains disconnected vertices which will be ignored."
"Use umap.utils.disconnected_vertices() to identify them."
)

return averages

0 comments on commit b24d9a1

Please sign in to comment.