Skip to content

Add parameter support to Python bindings#10

Open
Transurgeon wants to merge 3 commits intomainfrom
parameter-bindings
Open

Add parameter support to Python bindings#10
Transurgeon wants to merge 3 commits intomainfrom
parameter-bindings

Conversation

@Transurgeon
Copy link
Copy Markdown
Collaborator

Expose the SparseDiffEngine parameter API to Python, enabling updatable problem parameters that can be changed between solves without reconstructing the expression tree.

New bindings: make_parameter, make_param_scalar_mult, make_param_vector_mult, problem_register_params, problem_update_params.

Existing constant/matmul bindings updated to use the unified parameter API internally (backward compatible). Also fixes stale elementwise_univariate.h includes renamed in the engine.

Transurgeon and others added 2 commits April 6, 2026 17:00
Expose the SparseDiffEngine parameter API to Python, enabling updatable
problem parameters that can be changed between solves without
reconstructing the expression tree.

New bindings: make_parameter, make_param_scalar_mult,
make_param_vector_mult, problem_register_params, problem_update_params.

Existing constant/matmul bindings updated to use the unified
parameter API internally (backward compatible). Also fixes stale
elementwise_univariate.h includes renamed in the engine.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Unify make_constant into make_parameter with optional values arg
- Remove make_const_scalar_mult and make_const_vector_mult (use make_parameter + param variant)
- Unify rel_entr/rel_entr_scalar_vector/rel_entr_vector_scalar into single make_rel_entr with auto-dispatch
- Unify sparse/dense left/right matmul into make_left_matmul/make_right_matmul with format string

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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