From 5ac46ae8a6b9e0df2ca580992339f07e583704a4 Mon Sep 17 00:00:00 2001 From: Alex Pacini Date: Thu, 16 Jan 2020 10:38:39 +0000 Subject: [PATCH] Fixes a bug with numpy 1.18.1 that requires the number of point in the linspace to be an integer. modified: smithplot/smithaxes.py --- smithplot/smithaxes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smithplot/smithaxes.py b/smithplot/smithaxes.py index 2ed8cbb..b404975 100644 --- a/smithplot/smithaxes.py +++ b/smithplot/smithaxes.py @@ -1061,11 +1061,11 @@ def draw_nonfancy(grid): x_div, y_div = d_mat[i, k] - for xs in np.linspace(x0, x1, x_div + 1)[1:]: + for xs in np.linspace(x0, x1, int(x_div + 1))[1:]: x_lines.append([xs, y0, y1]) x_lines.append([xs, -y1, -y0]) - for ys in np.linspace(y0, y1, y_div + 1)[1:]: + for ys in np.linspace(y0, y1, int(y_div + 1))[1:]: y_lines.append([ys, x0, x1]) y_lines.append([-ys, x0, x1])