Skip to content

Commit b5a5024

Browse files
committed
fix test to initialize broadcast properly
1 parent ddad8af commit b5a5024

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/tensor/test_elemwise.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ def with_linker_inplace(self, linker, op, type, rand_val):
287287
# type shape provided by PyTensor was broadcastable/non-broadcastable
288288
x_type = type(
289289
pytensor.config.floatX,
290-
broadcastable=tuple(s if s == 1 else None for s in xsh),
290+
broadcastable=tuple(s == 1 for s in xsh),
291291
)
292292
y_type = type(
293293
pytensor.config.floatX,
294-
broadcastable=tuple(s if s == 1 else None for s in ysh),
294+
broadcastable=tuple(s == 1 for s in xsh),
295295
)
296296
else:
297297
x_type = type(pytensor.config.floatX, shape=[None for _ in xsh])

0 commit comments

Comments
 (0)