Skip to content

Commit

Permalink
Merge pull request #63 from stuartarchibald/pr_3719
Browse files Browse the repository at this point in the history
Respond to PR feedback.
  • Loading branch information
DrTodd13 committed Apr 18, 2019
2 parents fd171d1 + e25b75b commit 5dbca1f
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions numba/tests/test_stencils.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,7 @@ def handle2dindex(node):
idx.append(
ast.BinOp(
left=ast.Name(
id=self._id_pat %
self.ids[x],
id=self._id_pat % self.ids[x],
ctx=ast.Load()),
op=ast.Add(),
right=useval,
Expand Down Expand Up @@ -880,8 +879,7 @@ def handle1dindex(node):
useval = self._const_assigns.get(
node.slice.value, node.slice.value)
idx = ast.BinOp(left=ast.Name(
id=self._id_pat %
self.ids[0],
id=self._id_pat % self.ids[0],
ctx=ast.Load()),
op=ast.Add(),
right=useval,
Expand Down Expand Up @@ -938,8 +936,7 @@ def gen_idx(val, x):
value = self.get_val_from_num(val)
tmp = ast.BinOp(
left=ast.Name(
id=self._id_pat %
self.ids[x],
id=self._id_pat % self.ids[x],
ctx=ast.Load()),
op=ast.Add(),
right=useval,
Expand All @@ -957,8 +954,7 @@ def gen_idx(val, x):
def computeIndex(i, node):
useval = self._const_assigns.get(node.value, node.value)
idx = ast.BinOp(left=ast.Name(
id=self._id_pat %
self.ids[i],
id=self._id_pat % self.ids[i],
ctx=ast.Load()),
op=ast.Add(),
right=useval,
Expand Down Expand Up @@ -1393,11 +1389,8 @@ def generate_stencil_tree(
# If astor is installed the decompilation of the AST is also printed
DEBUG = False
if DEBUG:
try:
print("ORIGINAL")
print(ast.dump(tree))
except ImportError:
pass
print("ORIGINAL")
print(ast.dump(tree))

def pipeline(tree):
""" the pipeline of manipulations """
Expand Down

0 comments on commit 5dbca1f

Please sign in to comment.