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

error from scv.pp.moments(adata) #1260

Closed
QiqiGuo1996 opened this issue Jul 9, 2024 · 8 comments · Fixed by #1263
Closed

error from scv.pp.moments(adata) #1260

QiqiGuo1996 opened this issue Jul 9, 2024 · 8 comments · Fixed by #1263
Labels
bug Something isn't working

Comments

@QiqiGuo1996
Copy link

Hi Team,

I plan to run scv.pp.moments(adata) using example data (scv.datasets.pancreas()), but I got the error pasted below, (Python version 3.10, scvelo version: 0.3.2), do you know how to fix it? please feel free to let me know if you need to see any other information from the attempted run. Thank you so much.

scv.pp.moments(adata)
Traceback (most recent call last):
File "", line 1, in
File "/home/guoqq/.local/lib/python3.10/site-packages/scvelo/preprocessing/moments.py", line 63, in moments
neighbors(
File "/home/guoqq/.local/lib/python3.10/site-packages/scvelo/preprocessing/neighbors.py", line 223, in neighbors
n_duplicate_cells = len(get_duplicate_cells(adata))
File "/home/guoqq/.local/lib/python3.10/site-packages/scvelo/preprocessing/neighbors.py", line 555, in get_duplicate_cells
X_new = np.array(X[idx_dup].A if issparse(X) else X[idx_dup])
AttributeError: 'csr_matrix' object has no attribute 'A'

@QiqiGuo1996 QiqiGuo1996 added the bug Something isn't working label Jul 9, 2024
@WeilerP
Copy link
Member

WeilerP commented Jul 11, 2024

You can either install scvelo from source or downgrade scipy.

@matthieuheitz
Copy link

Which version of scipy should it work with?

@pdemko
Copy link

pdemko commented Jul 12, 2024

Making a fresh conda environment and installing scvelo from source fixed the issue.

@TTTPOB
Copy link

TTTPOB commented Jul 27, 2024

tried scipy 1.13.1, works.

kevinrue added a commit to kevinrue/velociraptor that referenced this issue Aug 30, 2024
kevinrue added a commit to kevinrue/velociraptor that referenced this issue Aug 30, 2024
* first attempt at macos m1 environment using micromamba

* scipy==1.13.1 (theislab/scvelo#1260)

* fix switch between environments

* add news
@stela2502
Copy link

Has that been fixed by now?!
I still get the same error.

scanpy==1.10.3
scvi==1.2.0
torch==2.5.1+cu124
scvelo==0.3.2
loompy==3.0.7
scanpy==1.10.3
igraph==0.11.6
pandas==2.2.3
re==2.2.1
numpy==1.26.4
h5py==3.12.1

@WeilerP
Copy link
Member

WeilerP commented Oct 31, 2024

@stela2502, it's fixed on main but I have not yet released a new version.

@stela2502
Copy link

Thank you.
Installing from git worked for me.

@stela2502
Copy link

Just a stupid question - is there no way to get a bugfix out in the open more quickly than in 4 month (assuming the fix is out next month). Or would that fix create an error for other people still using the other matrix elements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants