BUG: TypeError: Variables do not support boolean operations
with compute_test_value = "raise"
for observed random variable
#6981
Labels
Describe the issue:
Hi!
When running the tests for dfm/celerite2, with
pytensor.config.compute_test_value = "raise"
, for PyMC v5 and v4, I encountered the error below. I'm adding a simple example to reproduce.The error seems to come from the use of
np.broadcast_to()
onrv_var.shape
here.I believe replacing it
rv_var.type.shape
fixes the issue.Should I submit a PR with the change? If I write a test with the example below, where is the best place to put it?
Thank you!
Reproduceable code example:
Error message:
PyMC version information:
Context for the issue:
As mentioned above, the error affects dfm/celerite2 when running the test suite. Here is the output of that:
self = Lt.0
E TypeError: Variables do not support boolean operations.
venv/lib/python3.11/site-packages/pytensor/tensor/variable.py:72: TypeError
The text was updated successfully, but these errors were encountered: