Skip to content

Support xtensor inputs in check_parameters - #8399

Open
ishitta-iyer wants to merge 1 commit into
pymc-devs:mainfrom
ishitta-iyer:bugfix/check-parameters-xtensor
Open

Support xtensor inputs in check_parameters#8399
ishitta-iyer wants to merge 1 commit into
pymc-devs:mainfrom
ishitta-iyer:bugfix/check-parameters-xtensor

Conversation

@ishitta-iyer

Copy link
Copy Markdown

Description

Extend pymc.distributions.dist_math.check_parameters to fully support XTensorVariable expressions and conditions.
XTensor conditions are lowered before reduction with pt.all, avoiding PyTensor’s forbidden implicit XTensor-to-tensor conversion. XTensor expressions are lowered before applying CheckParameterValue, then converted back with their original dims. This also allows PyMC’s CheckParameterValue-to--inf compilation rewrite to operate correctly.
Ordinary tensor behavior remains unchanged, including mixed tensor/XTensor conditions. Focused regression tests cover valid and invalid conditions, compiled -inf replacement, return types, preserved dims, dtype and shape, mixed conditions, and Python boolean conditions.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@ishitta-iyer
ishitta-iyer force-pushed the bugfix/check-parameters-xtensor branch from b0f5e49 to 166a7e0 Compare August 14, 2026 23:58
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 pymc | 🛠️ Build #34075897 | 📁 Comparing 166a7e0 against latest (47bdf54)

  🔍 Preview build  

1 file changed
± glossary.html

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.

check_parameters should support xtensor inputs

1 participant