Skip to content

register_pairs - #222

Merged
flexatone merged 2 commits into
masterfrom
221/register-pairs
Aug 1, 2026
Merged

register_pairs#222
flexatone merged 2 commits into
masterfrom
221/register-pairs

Conversation

@flexatone

Copy link
Copy Markdown
Contributor

No description provided.

@flexatone flexatone linked an issue Aug 1, 2026 that may be closed by this pull request
@flexatone flexatone self-assigned this Aug 1, 2026
@flexatone
flexatone requested a review from Copilot August 1, 2026 01:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new bulk-registration API on TriMap (register_pairs) to efficiently register arbitrary (src, dst) locator pairs from NumPy arrays, primarily to support many-to-many join-like mappings without per-element Python overhead.

Changes:

  • Adds TriMap.register_pairs() in the C extension, exposing it via the method table.
  • Adds comprehensive Python tests covering many-to-many behavior, fill/unmatched rows, and error cases.
  • Updates the public type stub (.pyi) and the changelog section in README.rst.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/tri_map.c Implements TriMap_register_pairs() and registers it as a Python-exposed method.
test/test_tri_map.py Adds unit tests for register_pairs behavior and validation.
src/__init__.pyi Exposes the new method in the public typing surface.
README.rst Notes the addition of TriMap.register_pairs() under the 1.10.0 “What is New” section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tri_map.c Outdated
Comment thread src/tri_map.c
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@flexatone
flexatone merged commit 14f937a into master Aug 1, 2026
24 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.

TriMap.register_pairs

2 participants