pymc
pymc copied to clipboard
Check idata dims/coords consistency before sampling (fixes #7891)
Description
This PR implements validation to check idata dimensions and coordinates consistency before sampling begins, addressing issue #7891.
Problem
Previously, sampling would fail with unclear error messages when idata had inconsistent dims/coords with the model. This made debugging difficult.
Solution
Added early validation that:
- Checks dims/coords in idata before sampling starts
- Provides clear, actionable error messages for mismatches
- Prevents confusing failures deep in the sampling process
Testing
- All existing tests pass locally
- Manual testing confirms expected error behavior for dimension mismatches
Related Issue
Fixes #7891
📚 Documentation preview 📚: https://pymc--7949.org.readthedocs.build/en/7949/