scverse / scverse/rapids-singlecell
[neighbors] sparse matrix to ind/dist matrix pair: same as PyNNDescent?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 394
- Forks
- 52
- Avg merge
- 22h 5m
- Merged PRs (30d)
- 20
Description
We’ve been thinking about checking if Scanpy’s neighbors backends can benefit from the shortcut, but it seems like PyNNDescent behaves differently ((n_neighbors - 1) * n_obs instead of n_neighbors * n_obs)
Shouldn’t the two match up in behavior? Is this a cupy bug? I’m unsure where to harmonize this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the linked sections of rapids_singlecell/preprocessing/_neighbors.py and scanpy/neighbors/_common.py, focusing on how the sparse matrix is converted to the distance and index pair. Check whether the differing n_neighbors shapes come from the backend or an intentional PyNNDescent convention. Done means the behavior is understood and, if it should match, the two paths are harmonized with coverage for the resulting shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics, data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100