Skip to content

Conversation

@jessegrabowski
Copy link
Member

This hasn't ever come up, but if we end up with more support for batch dims/time varying, we have to be more careful about shape assumptions inside the kalman filters. This PR switches things to batch-friendly operations, switching x.dot(y) to x @ y (the latter is blockwise) and x.T for x.mT (in case x is not 2d).

There are still a few .T sprinkled in there, mostly because there are some 1d objects. It might be preferable to switch everything to 2d (so that e.g. data will be represented as a column vector). This has it's own drawbacks, mostly related to unintentional broadcasting. I tried it in an early iteration and eventually got to where things are now.

Copy link
Contributor

@AlexAndorra AlexAndorra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about that mT trick -- that's neat! All good to go @jessegrabowski !
Ruff is failing though; I'll merge once you push again

Copy link
Contributor

@Dekermanjian Dekermanjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also was not aware of the .mT method, very cool! I looked through the code changes and everything looks good to me!

@jessegrabowski jessegrabowski merged commit 250e81a into main Oct 17, 2025
17 checks passed
@jessegrabowski jessegrabowski deleted the quad-form-mT branch October 17, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants