Skip to content

Commit 8dd6f7e

Browse files
committed
Scalar while loop defaults to False if n_steps == 0
1 parent fa177fb commit 8dd6f7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/scalar/loop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def perform(self, node, inputs, output_storage):
183183
inner_fn = self.py_perform_fn
184184

185185
if self.is_while:
186-
until = True
186+
until = False
187187
for i in range(n_steps):
188188
*carry, until = inner_fn(*carry, *constant)
189189
if until:

0 commit comments

Comments
 (0)