scanpy 1.4.2 breaks pp.moments
See original GitHub issueThe new version of scanpy released today appears to break scvelo.pp.moments
(and presumably much of scanpy itself). This is reproducible with the Dentate Gyrus example data. Full error (following the example vignette):
>>> scv.pp.moments(adata, n_pcs=30, n_neighbors=30)
computing neighbors
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/scvelo/preprocessing/moments.py", line 45, in moments
neighbors(adata, n_neighbors=n_neighbors, use_rep=use_rep, n_pcs=n_pcs, method=method, metric=metric)
File "/usr/local/lib/python3.7/site-packages/scvelo/preprocessing/neighbors.py", line 82, in neighbors
neighbors = Neighbors(adata)
File "/usr/local/lib/python3.7/site-packages/scanpy/neighbors/__init__.py", line 466, in __init__
self.n_neighbors = int(self._distances.count_nonzero() / self._distances.shape[0])
AttributeError: 'NoneType' object has no attribute 'count_nonzero'
Rolling back to scanpy
1.4.1 solves the problem. @theislab - Filing this issue here rather than in the scanpy repo as I don’t have a reproducible upstream example.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
scanpy.pp.scale — Scanpy 1.9.1 documentation
Scale data to unit variance and zero mean. ... Variables (genes) that do not display any variation (are constant across all observations) are...
Read more >584126.txt
Read the Docs build information Build id: 584126 Project: icb-scanpy Version: ... this may take a moment. loading translations [en]... done making output ......
Read more >Bioconductor 3.16 Released
November 2, 2022. Bioconductors: We are pleased to announce Bioconductor 3.16, consisting of 2183 software packages, 416 experiment data ...
Read more >scVelo documentation
scVelo is compatible with Scanpy and hosts efficient implementations of all RNA ... scvelo.pp.moments(data, n_neighbors=30, n_pcs=None, ...
Read more >restarting kernel - You.com | The AI Search Engine ...
The kernel always restarted when I ran sc.pp.neighbor after importing scvi ... the kernel will always restart. import scanpy as sc import scvi...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK! We should make 1.4.3 asap in this case.
Thanks @Koncopd.