We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8e0adc commit 833a3e8Copy full SHA for 833a3e8
pytensor/tensor/var.py
@@ -616,9 +616,9 @@ def __iter__(self):
616
except TypeError:
617
# This prevents accidental iteration via sum(self)
618
raise TypeError(
619
- "TensorType does not support iteration. "
620
- "Maybe you are using builtins.sum instead of "
621
- "pytensor.tensor.math.sum? (Maybe .max?)"
+ "TensorType does not support iteration.\n"
+ "\tDid you pass a PyTensor variable to a function that expects a list?\n"
+ "\tMaybe you are using builtins.sum instead of pytensor.tensor.sum?"
622
)
623
624
@property
0 commit comments