Commit 609c4b08 authored by Martin Bauer's avatar Martin Bauer
Browse files

Substitutions inside field accesses

parent 9f76ea1d
......@@ -646,6 +646,12 @@ class Field(AbstractField):
return Field.Access(self.field, self.offsets, idx_tuple, dtype=self.dtype)
def _eval_subs(self, old, new):
return Field.Access(self.field,
tuple(sp.sympify(a).subs(old, new) for a in self.offsets),
tuple(sp.sympify(a).subs(old, new) for a in self.index),
def is_absolute_access(self) -> bool:
"""Indicates if a field access is relative to the loop counters (this is the default) or absolute"""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment