Skip to content

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Oct 31, 2024

This is a special-edge case that behaves differently than other boolean indexing. It adds a new dimension (either empty or with one entry). The logic in make_node and infer_shape don't handle this.

Small cleanup around #442. I suspect the extra logic needed in the Op (and rewrites) to accommodate this special rule aren't justified or needed (since nobody requested it until now). If someone wants to work on it, they can of course!

The PR simply raises an informative error instead of failing cryptically like before.


📚 Documentation preview 📚: https://pytensor--1063.org.readthedocs.build/en/1063/

This is a special-edge case that behaves differently than other boolean indexing. It adds a new dimension (either empty or with one entry). The logic in `make_node` and `infer_shape` don't handle this.
@ricardoV94 ricardoV94 force-pushed the scalar_boolean_raise branch from eab0019 to b08fb2a Compare October 31, 2024 17:19
Copy link
Member

@lucianopaz lucianopaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@lucianopaz lucianopaz merged commit f0244ad into pymc-devs:main Oct 31, 2024
59 checks passed
@ricardoV94 ricardoV94 deleted the scalar_boolean_raise branch October 31, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants