From b4c778d79c5c7d0cb1c1d8e5e4b7f3503cf4d1c0 Mon Sep 17 00:00:00 2001 From: Joseph Weston <joseph@weston.cloud> Date: Wed, 1 Aug 2018 15:05:12 +0200 Subject: [PATCH] make multidimensional slice into a tuple, rather than a list In the future numpy will not allow multidimensional slices that are specified as sequences other than tuples. Closes #210. --- kwant/plotter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kwant/plotter.py b/kwant/plotter.py index a3c4320f..4fcdbacd 100644 --- a/kwant/plotter.py +++ b/kwant/plotter.py @@ -1943,7 +1943,7 @@ def interpolate_current(syst, current, relwidth=None, abswidth=None, n=9): # Zero volume: nothing to do. continue - field_slice = [slice(*slices[i, d]) for d in range(dim)] + field_slice = tuple([slice(*slices[i, d]) for d in range(dim)]) # Coordinates of the grid points that are within range of the current # hopping. -- GitLab