fix(solver): build weight vector after pre-passes to match free param count #35
Reference in New Issue
Block a user
Delete Branch "fix/weight-vector-after-prepass"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The weight vector was built before
substitution_passandsingle_equation_pass, which can fix variables and reduce the free parameter count. This caused a shape mismatch innewton_solvewhen the Jacobian (built from the reduced free params) had fewer columns than the weight vector had entries:The broadcast happens at
newton.py:103:Fix
Move
build_weight_vector()after both pre-passes in both the solve and drag paths, so its length matches the actual free parameters used by the Jacobian.