Skip to content

Shared string ranker - #39

Merged
marco-mariotti merged 3 commits into
masterfrom
shared-string-ranker
Aug 13, 2026
Merged

Shared string ranker#39
marco-mariotti merged 3 commits into
masterfrom
shared-string-ranker

Conversation

@marco-mariotti

Copy link
Copy Markdown
Member

No description provided.

marco-mariotti and others added 3 commits August 10, 2026 12:21
`ruranges.numpy.nearest(..., ties="first")` reports one neighbour per
distance instead of every neighbour at that distance, binding
`ruranges_core::nearest::nearest_with_ties`. The default, `"all"`, is
what nearest has always done, and the kernel builds the same output for
it as before.

With `include_overlaps=True` every interval a query overlaps sits at
distance 0, so "all tied neighbours" is "every overlapping interval":
on 100 million hg38-like intervals that is 1.1 billion rows against 7.7
million for one per query. The tied rows are never built, so the saving
is in memory as well as time.

`ties` is parsed in the binding rather than in the kernel's `FromStr`,
which panics. A PanicException is not an Exception, so `except
Exception` cannot catch it and the interpreter is aborted -- the same
trap `direction` fell into and pyranges1 had to guard against.

Requires ruranges-core 0.1.13, patched to the adjacent checkout until it
is published.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@marco-mariotti
marco-mariotti merged commit b4b6a3b into master Aug 13, 2026
14 of 15 checks passed
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.

1 participant