Skip to content

Commit 11a915b

Browse files
committed
minor fix for readability
1 parent ebb0e75 commit 11a915b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytensor/tensor/basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3232,7 +3232,6 @@ def make_node(self, start, stop, step):
32323232
assert stop.ndim == 0
32333233
assert step.ndim == 0
32343234

3235-
shape = (None,)
32363235
# if it is possible to directly determine the shape i.e static shape is present, we find it.
32373236
if (
32383237
isinstance(start, TensorConstant)
@@ -3243,6 +3242,8 @@ def make_node(self, start, stop, step):
32433242
ceil((float(stop.data) - float(start.data)) / float(step.data)), 0
32443243
)
32453244
shape = (length,)
3245+
else:
3246+
shape = (None,)
32463247

32473248
inputs = [start, stop, step]
32483249
outputs = [tensor(dtype=self.dtype, shape=shape)]

0 commit comments

Comments
 (0)