Skip to content
Snippets Groups Projects
Commit 099c281a authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Determine undefined_symbols of SympyAssignment by free_symbols instead

of atoms (needed for Sum,Product: Symbol is used and defined in rhs)

This filters out symbols that have arguments.
sp.Indexed should not be considered only its arguments.
parent 1cb265e6
Branches
No related tags found
No related merge requests found
...@@ -517,7 +517,7 @@ class SympyAssignment(Node): ...@@ -517,7 +517,7 @@ class SympyAssignment(Node):
@property @property
def undefined_symbols(self): def undefined_symbols(self):
result = self.rhs.atoms(sp.Symbol) result = {s for s in self.rhs.free_symbols if not isinstance(s, sp.Indexed)}
# Add loop counters if there a field accesses # Add loop counters if there a field accesses
loop_counters = set() loop_counters = set()
for symbol in result: for symbol in result:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment