Skip to content

refactor: unify vector/matrix dispatch with Tree enum#191

Merged
Neclow merged 4 commits intosbhattlab:mainfrom
Neclow:refactor/tree-enum-api-cleanup
Feb 9, 2026
Merged

refactor: unify vector/matrix dispatch with Tree enum#191
Neclow merged 4 commits intosbhattlab:mainfrom
Neclow:refactor/tree-enum-api-cleanup

Conversation

@Neclow
Copy link
Collaborator

@Neclow Neclow commented Feb 9, 2026

Closes #189

  • Unify vector/matrix dispatch using a Tree enum at the PyO3 and extendr binding layers, replacing separate _with_bls/_from_matrix functions and Python/R-side ndim checking
  • Convert panics to Result for bounds checking in get_node_depth and get_common_ancestor for proper error propagation through FFI
  • Simplify Python and R wrappers to thin pass-throughs

Replace separate _with_bls/_from_matrix functions and Python/R-side
ndim checking with a Tree enum at the PyO3 and extendr binding layers.
Convert panics to Results for bounds checking in get_node_depth and
get_common_ancestor. Simplify Python and R wrappers to thin
pass-throughs where possible.
@Neclow Neclow force-pushed the refactor/tree-enum-api-cleanup branch from dfec9c2 to 338f642 Compare February 9, 2026 15:41
@Neclow Neclow merged commit 0d2217e into sbhattlab:main Feb 9, 2026
9 checks passed
@Neclow Neclow deleted the refactor/tree-enum-api-cleanup branch February 9, 2026 15:52
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.

Unify vector/matrix dispatch in Rust bindings

1 participant

Comments