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

Bugfix: Pystencils printed `const` twice on assignments to const numpy.dtypes

Pystencils will print two const when printing an assignment to a const numpy.dtype.
With the new type interference, this case can now occur more often
parent 0ff425f3
Branches
Tags
1 merge request!64Bugfix avoid east and west const
......@@ -229,7 +229,7 @@ class CBackend:
prefix = 'const '
else:
prefix = ''
data_type = prefix + self._print(node.lhs.dtype) + " "
data_type = prefix + self._print(node.lhs.dtype).replace(' const', '') + " "
return "%s%s = %s;" % (data_type, self.sympy_printer.doprint(node.lhs),
self.sympy_printer.doprint(node.rhs))
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment