From bdf05d96be3adfa9cfe3f8df3153b0cf42dc85d7 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Fri, 8 Jan 2021 23:14:44 -0800 Subject: [PATCH] fix numpy warning about indexing with a list --- gridlock/draw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gridlock/draw.py b/gridlock/draw.py index 6865c5d..15a6bff 100644 --- a/gridlock/draw.py +++ b/gridlock/draw.py @@ -361,9 +361,9 @@ def draw_extrude_rectangle(self, fpart = z - floor(z) mult = [1-fpart, fpart][::s] # reverses if s negative - eps = mult[0] * grid[ind] + eps = mult[0] * grid[tuple(ind)] ind[direction] += 1 - eps += mult[1] * grid[ind] + eps += mult[1] * grid[tuple(ind)] def f_eps(xs, ys, zs, i=i, eps=eps) -> numpy.ndarray: # transform from natural position to index