Skip to content

Commit 9f74a1d

Browse files
committed
fix: use of star expression in index
1 parent 56f3668 commit 9f74a1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sumpy/kernel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,10 +1092,10 @@ def __init__(self, vec_name, additional_indices):
10921092

10931093
def map_subscript(self, expr):
10941094
from pymbolic.primitives import CommonSubexpression, cse_scope
1095-
if (expr.aggregate.name == self.vec_name
1096-
and isinstance(expr.index, int)):
1095+
if (expr.aggregate.name == self.vec_name and isinstance(expr.index, int)):
1096+
index = (expr.index, *self.additional_indices)
10971097
return CommonSubexpression(
1098-
expr.aggregate[(expr.index, *self.additional_indices)],
1098+
expr.aggregate[index],
10991099
prefix=None, scope=cse_scope.EVALUATION)
11001100
else:
11011101
return IdentityMapper.map_subscript(self, expr)

0 commit comments

Comments
 (0)