Skip to content

Commit

Permalink
Fix for issue #71 -- sparse correlation not available in pairwise_dis…
Browse files Browse the repository at this point in the history
…tances
  • Loading branch information
lmcinnes authored May 23, 2018
1 parent 3c2b200 commit 9e199e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion umap/umap_.py
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ def fit(self, X, y=None):
print("Construct fuzzy simplicial set")

# Handle small cases efficiently by computing all distances
if X.shape[0] < 4096:
if X.shape[0] < 4096 and not (metric == 'correlation' and scipy.sparse.isspmatrix_csr(X)):
dmat = pairwise_distances(X, metric=self.metric, **self.metric_kwds)
self.graph = fuzzy_simplicial_set(
dmat,
Expand Down

0 comments on commit 9e199e4

Please sign in to comment.