dynamo-release: UnboundLocalError in dyn.ext.ddhodge

Hi, there is a error when I run ddhodge as below:

dyn.ext.ddhodge(adata, basis='pca')
~/.local/lib/python3.8/site-packages/anndata/_core/anndata.py:1095: FutureWarning: The `inplace` parameter in pandas.Categorical.remove_unused_categories is deprecated and will be removed in a future version.
  df_sub[k].cat.remove_unused_categories(inplace=True)
|-----------> not all cells are used, set diag to 1...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/.local/lib/python3.8/site-packages/dynamo/external/hodge.py", line 214, in ddhodge
    k = nbrs_idx.shape[1]
UnboundLocalError: local variable 'nbrs_idx' referenced before assignment

I don’t know how to solve it.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @lh12565 ,

Yes the issue was confirmed. We fixed it and it should work now. Please try

source activate dynamonew
pip uninstall dynamo
pip install git+https://github.com/dummyindex/dynamo-release.git@fix-issue-289

Or you can wait the #291 to be merged soon. Sorry for the glitches and thanks for your report. Please let us know if this fixes the problem.

Thanks! It works! You are the most efficient person I have ever met.