Skip to content

Fix broadcast check on IncSubtensor with boolean masks#2303

Merged
ricardoV94 merged 1 commit into
pymc-devs:mainfrom
ricardoV94:fix_runtime_broadcasting_on_bool
Jul 19, 2026
Merged

Fix broadcast check on IncSubtensor with boolean masks#2303
ricardoV94 merged 1 commit into
pymc-devs:mainfrom
ricardoV94:fix_runtime_broadcasting_on_bool

Conversation

@ricardoV94

@ricardoV94 ricardoV94 commented Jul 19, 2026

Copy link
Copy Markdown
Member

When we replaced AdvancedSetSubtensor1 -> AdvacedSubtensor1 we moved the runtime check on the first axis (not yet full runtime check), but we didn't gate correctly on whether that first vector index is a integer or a bool, for bool it's not the shape that matters it's the entries == 1 (aka sum()).

For now I keep just the old check conditions. We'll extend the runtime broadcasting to be exhaustive but I want to delay more breaking changes for now

@ricardoV94 ricardoV94 added bug Something isn't working indexing labels Jul 19, 2026
Comment thread pytensor/tensor/subtensor.py Outdated
@ricardoV94
ricardoV94 force-pushed the fix_runtime_broadcasting_on_bool branch from 187fb88 to 140b827 Compare July 19, 2026 12:36
@ricardoV94
ricardoV94 force-pushed the fix_runtime_broadcasting_on_bool branch from 140b827 to e7687fb Compare July 19, 2026 12:53
@ricardoV94
ricardoV94 merged commit c3df6a5 into pymc-devs:main Jul 19, 2026
118 of 120 checks passed
@ricardoV94
ricardoV94 deleted the fix_runtime_broadcasting_on_bool branch July 19, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working indexing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants