Skip to content

Fix one-sided dense interpolation for backward solves - #796

Open
AryanRG wants to merge 1 commit into
patrick-kidger:mainfrom
AryanRG:fix/backward-dense-interpolation-sides
Open

AryanRG wants to merge 1 commit into
patrick-kidger:mainfrom
AryanRG:fix/backward-dense-interpolation-sides

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 28, 2026

Copy link
Copy Markdown

Backward dense interpolation interprets left in the solver's internal time direction, so it selects the opposite side of a knot. This gives the wrong one-sided derivative from both Solution.derivative() and differentiating Solution.evaluate().

Reverse the side selection for backward solves. The regression tests cover both time directions, float32/float64, PyTree outputs and JIT/vmap.

Validation: the complete CPU test collection passed in isolated runs, and the strict docs build passed. Local Pyright diagnostics match the unchanged base.

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