From d19dea2afcc27a5a1717bb31f35402eb217ad254 Mon Sep 17 00:00:00 2001
From: Dominik Thoennes <dominik.thoennes@fau.de>
Date: Tue, 26 Jan 2021 08:49:59 +0100
Subject: [PATCH] int64_t prevents warnings when comparing loop variable to
 arguments which are int64_t by default

---
 pystencils/backends/cbackend.py | 2 +-
 pystencils/stencil.py           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pystencils/backends/cbackend.py b/pystencils/backends/cbackend.py
index 27d648012..654b92b82 100644
--- a/pystencils/backends/cbackend.py
+++ b/pystencils/backends/cbackend.py
@@ -227,7 +227,7 @@ class CBackend:
 
     def _print_LoopOverCoordinate(self, node):
         counter_symbol = node.loop_counter_name
-        start = f"int {counter_symbol} = {self.sympy_printer.doprint(node.start)}"
+        start = f"int64_t {counter_symbol} = {self.sympy_printer.doprint(node.start)}"
         condition = f"{counter_symbol} < {self.sympy_printer.doprint(node.stop)}"
         update = f"{counter_symbol} += {self.sympy_printer.doprint(node.step)}"
         loop_str = f"for ({start}; {condition}; {update})"
diff --git a/pystencils/stencil.py b/pystencils/stencil.py
index 668ea96bf..3d345990a 100644
--- a/pystencils/stencil.py
+++ b/pystencils/stencil.py
@@ -357,7 +357,7 @@ def plot_2d(stencil, axes=None, figure=None, data=None, textsize='12', **kwargs)
             else:
                 return 0
         text_position = [direction[c] + position_correction(direction[c]) for c in (0, 1)]
-        axes.text(*text_position, annotation, verticalalignment='center',
+        axes.text(x=text_position[0], y=text_position[1], s=annotation, verticalalignment='center',
                   zorder=30, horizontalalignment='center', size=textsize,
                   bbox=dict(boxstyle=text_box_style, facecolor='#00b6eb', alpha=0.85, linewidth=0))
 
-- 
GitLab