Skip to content

Commit 22910a3

Browse files
committed
tests: Tweak check_array
1 parent ebb2791 commit 22910a3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,11 @@ def check_array(array, exp_halo, exp_shape, rotate=False):
467467

468468
shape = []
469469
for i in array.symbolic_shape:
470-
if i.is_Number or i.is_Symbol:
471-
shape.append(i)
472-
else:
473-
assert i.is_Add
470+
if i.is_Add:
471+
# Ensure it's a plain sympy.Add and not a subclass
474472
shape.append(Add(*i.args))
473+
else:
474+
shape.append(i)
475475

476476
if rotate:
477477
exp_shape = (sum(exp_halo[0]) + 1,) + tuple(exp_shape[1:])

0 commit comments

Comments
 (0)