Skip to content

Add final factorial state to filtering output#259

Merged
Sahel13 merged 3 commits into
mainfrom
return-out-factorial
Jun 9, 2026
Merged

Add final factorial state to filtering output#259
Sahel13 merged 3 commits into
mainfrom
return-out-factorial

Conversation

@SamDuffield

Copy link
Copy Markdown
Contributor

Lots of places this will be handy I think

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 updates the factorial offline filtering API to also return the final factorial state when output_factorial=False, and updates tests/docs accordingly.

Changes:

  • Extend cuthbert.factorial.filter(..., output_factorial=False) to return (init_state, local_states, final_state).
  • Update factorial test suites to unpack the new 3-tuple return and add assertions for final_state.
  • Update the factorial README example to reflect the new return shape.

Reviewed changes

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

Show a summary per file
File Description
cuthbert/factorial/filtering.py Returns final_factorial_state in the non-factorial output path; updates docstring/typing accordingly.
cuthbert/factorial/README.md Adjusts example usage to unpack the additional final_factorial_state.
tests/cuthbert/factorial/test_kalman.py Unpacks the additional return value and validates final_state matches reference.
tests/cuthbert/factorial/test_discrete.py Unpacks the additional return value and validates final_state matches reference.
tests/cuthbert/factorial/test_smc.py Updates unpacking for the non-factorial output path.
tests/cuthbert/factorial/test_taylor.py Updates JIT’d call site to unpack the additional return value.

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

Comment thread cuthbert/factorial/filtering.py Outdated
Comment thread cuthbert/factorial/filtering.py Outdated
@Sahel13 Sahel13 merged commit 72c4999 into main Jun 9, 2026
2 checks passed
@Sahel13 Sahel13 deleted the return-out-factorial branch June 9, 2026 21:30
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.

4 participants