Skip to content

Commit 23bbabf

Browse files
committed
Scalar while loop defaults to False if n_steps == 0
1 parent c025809 commit 23bbabf

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
@@ -180,7 +180,7 @@ def perform(self, node, inputs, output_storage):
180180
inner_fn = self.py_perform_fn
181181

182182
if self.is_while:
183-
until = True
183+
until = False
184184
for i in range(n_steps):
185185
*carry, until = inner_fn(*carry, *constant)
186186
if until:

0 commit comments

Comments
 (0)