diff --git a/umap/umap_.py b/umap/umap_.py index b01e4f35..36ae495a 100644 --- a/umap/umap_.py +++ b/umap/umap_.py @@ -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 and not (metric == 'correlation' and scipy.sparse.isspmatrix_csr(X)): + if X.shape[0] < 4096 and not (self.metric == 'correlation' and scipy.sparse.isspmatrix_csr(X)): dmat = pairwise_distances(X, metric=self.metric, **self.metric_kwds) self.graph = fuzzy_simplicial_set( dmat,