From aace7a26ca40b06148f9d7bc83610f7fedee9a10 Mon Sep 17 00:00:00 2001 From: Leland McInnes Date: Thu, 15 Feb 2018 10:52:27 -0500 Subject: [PATCH] Fix issue #43 --- umap/umap_.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umap/umap_.py b/umap/umap_.py index 4dc920c1..2604390f 100644 --- a/umap/umap_.py +++ b/umap/umap_.py @@ -880,7 +880,7 @@ def spectral_layout(graph, dim, random_state): return eigenvectors[:, order] else: init = random_state.uniform(low=-10.0, high=10.0, - size=(n_samples, 2)) + size=(n_samples, dim)) init[labels == largest_component] = eigenvectors[:, order] return init except scipy.sparse.linalg.ArpackError: @@ -889,7 +889,7 @@ def spectral_layout(graph, dim, random_state): 'adding some noise or jitter to your data.\n\n' 'Falling back to random initialisation!') return random_state.uniform(low=-10.0, high=10.0, - size=(graph.shape[0], 2)) + size=(graph.shape[0], dim)) @numba.njit()