Skip to content

[r] Fix knn_hnsw() input query rowname bug#334

Merged
bnprks merged 2 commits into
bnprks:mainfrom
GreenleafLab:el/knn_hnsw-query-bugfix
Apr 9, 2026
Merged

[r] Fix knn_hnsw() input query rowname bug#334
bnprks merged 2 commits into
bnprks:mainfrom
GreenleafLab:el/knn_hnsw-query-bugfix

Conversation

@erliuu

@erliuu erliuu commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

This pull request fixes a bug in knn_hnsw() where the rownames of the result matrices were incorrectly taken from data instead of query when a separate query matrix was provided. This caused the output to have wrong rownames (from the reference data) rather than the rownames corresponding to the actual query points. When no query is given, query is already set to data, so behavior is unchanged in that case. (r/R/clustering.R)

@bnprks

bnprks commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Looks great, thanks! Sorry about the broken CI checks, but tests good locally and is pretty obviously good

@bnprks bnprks merged commit 28759cd into bnprks:main Apr 9, 2026
0 of 4 checks passed
@bnprks bnprks deleted the el/knn_hnsw-query-bugfix branch April 9, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants