Handle zero-variance covariance dimensions in sampling - #147
Open
sylvesterkaczmarek wants to merge 1 commit into
Open
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
=======================================
Coverage 97.39% 97.39%
=======================================
Files 17 17
Lines 5897 5899 +2
=======================================
+ Hits 5743 5745 +2
Misses 154 154
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
sylvesterkaczmarek
marked this pull request as ready for review
September 19, 2026 20:50
sylvesterkaczmarek
force-pushed
the
fix/zero-variance-covariance
branch
from
October 1, 2026 07:04
1b2880f to
fa926f0
Compare
Contributor
Author
|
Rebased onto current main today; the branch is now 0 behind, mergeable, and the fresh SSAPy matrix is green. The rewritten head is GitHub Verified. Could a maintainer review it when convenient? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handle zero marginal variances when normalizing covariance matrices in
sample_points()andsigma_points(). Valid positive-semidefinite covariances can have deterministic coordinates, but the current normalization divides their zero rows/columns by zero, producing NaNs andLinAlgError: SVD did not converge.Use a unit denominator for those zero scale products while retaining the original zero marginal factors. Fixed coordinates therefore remain exactly at their means. Positive-variance behavior, sigma-point scaling, the
sqrt=Truepath, and caller-owned covariance arrays are unchanged.Validation
Python 3.12, NumPy 2.5.3, SciPy 1.18.1 on macOS arm64:
8bb784c): 10 failed, 2 passed. With the fix: all 12 passed.utils.py. Syntax checks andgit diff --checkpass.No native code or public API changes. Other operating systems were not tested locally.