Skip to content

Fix Cholesky structural_shock_matrix dim/coord ordering#29

Open
niall-stack wants to merge 1 commit intothomaspinder:mainfrom
niall-stack:fix-26-cholesky-dim-order
Open

Fix Cholesky structural_shock_matrix dim/coord ordering#29
niall-stack wants to merge 1 commit intothomaspinder:mainfrom
niall-stack:fix-26-cholesky-dim-order

Conversation

@niall-stack
Copy link
Copy Markdown

Summary\nFixes the Cholesky identification output to use the same dim/coord ordering as the sign-restriction path (

esponse, shock).\n\n### Changes\n- In Cholesky.identify, changed structural_shock_matrix dims from:\n - (chain, draw, shock, response)\n to:\n - (chain, draw, response, shock)\n- Updated coord mapping accordingly.\n- Added a regression assertion in ests/test_identification.py to lock the expected dim + coord order.\n\n## Why\nIssue #26 reports that Cholesky xarray labels are transposed relative to SignRestriction, which can cause downstream confusion/misalignment.\n\n## Validation\nAdded targeted test assertions for dims and coords.\n\nNote: I couldn’t execute pytest in this environment because no Python runtime is installed on host (py -3.11 reports no suitable runtime).

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.9%. Comparing base (cfe95cc) to head (91a2d62).
⚠️ Report is 1 commits behind head on main.

❌ Your project status has failed because the head coverage (88.9%) is below the target coverage (90.0%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@          Coverage Diff          @@
##            main     #29   +/-   ##
=====================================
  Coverage   88.9%   88.9%           
=====================================
  Files         16      16           
  Lines        651     651           
  Branches      83      83           
=====================================
  Hits         579     579           
  Misses        53      53           
  Partials      19      19           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thomaspinder
Copy link
Copy Markdown
Owner

Thanks for opening this PR. It looks like the PR branch is stale, so I think you'll just need to rebase the PR. Once this is done, I think we can merge.

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.

3 participants