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
......@@ -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:
......
Markdown is supported
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