diff --git a/pymbolic/primitives.py b/pymbolic/primitives.py index 4be517cbee20fd5cc828c33f179ad5331b79e66b..660aed673cb7bcc95d73b9c1574c12144aa0f73c 100644 --- a/pymbolic/primitives.py +++ b/pymbolic/primitives.py @@ -1563,7 +1563,7 @@ def make_sym_vector(name, components): from pytools.obj_array import join_fields vfld = Variable(name) - return join_fields(*[vfld[i] for i in components]) + return join_fields(*[vfld.index(i) for i in components]) def make_sym_array(name, shape): @@ -1575,7 +1575,7 @@ def make_sym_array(name, shape): result = np.zeros(shape, dtype=object) from pytools import indices_in_shape for i in indices_in_shape(shape): - result[i] = vfld[i] + result[i] = vfld.index(i) return result