Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy.sparse._csparsetools.lil_get_lengths Error Running UMAP #1078

Open
Azzarekt opened this issue Dec 14, 2023 · 0 comments
Open

scipy.sparse._csparsetools.lil_get_lengths Error Running UMAP #1078

Azzarekt opened this issue Dec 14, 2023 · 0 comments

Comments

@Azzarekt
Copy link

Azzarekt commented Dec 14, 2023

Chunk of code:

``

# 2 UMAP
plot_kwds = {'alpha': 0.3, 's': 0.2, 'linewidths': 0}
UMAP_kwds = {'n_neighbors': 30, 'min_dist': 0.1, 'n_components': 2, 'random_state': SEED}

mapper = UMAP(random_state=42,verbose = True).fit(matrix)
#X_r = Umap(matrix, UMAP_kwds, plot_kwds)

``
Even with a one liner it doesn't work

mapper = UMAP(random_state=42,verbose = True).fit(matrix)

I've tried downgrading scipy to various versions but still unable to make it work.
My output:

UMAP(random_state=42,` verbose=True)
Construct fuzzy simplicial set
Thu Dec 14 12:55:37 2023 Finding Nearest Neighbors
Thu Dec 14 12:55:37 2023 Building RP forest with 25 trees
Thu Dec 14 12:55:57 2023 NN descent for 17 iterations
    0  /  17
    1  /  17
    2  /  17
    3  /  17
    4  /  17
    5  /  17
Thu Dec 14 12:56:49 2023 Finished Nearest Neighbor Search
Traceback (most recent call last):
 File "***\Umap_deepseqprot.py", line 138, in <module>
   results = Main(files)
 File "***\Umap_deepseqprot.py", line 105, in Main
   mapper = UMAP(random_state=42,verbose = True).fit(matrix)
 File "***\venv\lib\site-packages\umap\umap_.py", line 1452, in fit
   self._search_graph.transpose()
 File "***\venv\lib\site-packages\scipy\sparse\lil.py", line 437, in transpose
   return self.tocsr(copy=copy).transpose(axes=axes, copy=False).tolil(copy=False)
 File "***\venv\lib\site-packages\scipy\sparse\lil.py", line 468, in tocsr
   _csparsetools.lil_get_lengths(self.rows, lengths)
 File "_csparsetools.pyx", line 109, in scipy.sparse._csparsetools.lil_get_lengths
ValueError: Buffer has wrong number of dimensions (expected 1, got 2)

Process finished with exit code 1
```



@Azzarekt Azzarekt changed the title Error Running UMAP scipy.sparse._csparsetools.lil_get_lengths Error Running UMAP Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant