question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scanpy 1.4.2 breaks pp.moments

See original GitHub issue

The 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:closed
  • Created 4 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
falexwolfcommented, May 8, 2019

@falexwolf @VolkerBergen there was a mistake of mine, now it is fixed. Everything should work. theislab/scanpy@a69e0d1

OK! We should make 1.4.3 asap in this case.

0reactions
VolkerBergencommented, May 8, 2019

Thanks @Koncopd.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found