scvelo: scanpy 1.4.2 breaks pp.moments

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.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@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.