Skip to content

Validate SPD matrices in covariance inversion utility - #231

Open
fujikix1102 wants to merge 1 commit into
cosmosis-developers:mainfrom
fujikix1102:audit/next-numerical-stability
Open

fujikix1102 wants to merge 1 commit into
cosmosis-developers:mainfrom
fujikix1102:audit/next-numerical-stability

Conversation

@fujikix1102

Copy link
Copy Markdown

Summary

  • validate covariance/Fisher matrices before SPD inversion
  • replace LAPACK inverse calls with Cholesky factorization and solves
  • reject non-square, non-finite, asymmetric, and non-positive-definite inputs clearly
  • add regression tests for valid and invalid matrices

Validation

  • PYTHONPATH=$PWD pytest -q cosmosis/test/test_utils.py -k symmetric_positive --disable-warnings --maxfail=1
  • 3 passed, 5 deselected

@fujikix1102
fujikix1102 force-pushed the audit/next-numerical-stability branch from 5290344 to fddc6b8 Compare September 23, 2026 22:32
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