From 2acbda4764483253863cf4bedf3eadb1f4dadf8e Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 9 Jul 2019 20:12:03 -0700 Subject: [PATCH] Force slices to be a tuple --- fdfd_tools/waveguide_mode.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fdfd_tools/waveguide_mode.py b/fdfd_tools/waveguide_mode.py index 917c535..ab27d35 100644 --- a/fdfd_tools/waveguide_mode.py +++ b/fdfd_tools/waveguide_mode.py @@ -234,6 +234,8 @@ def compute_overlap_e(E: field_t, :param mu: Magnetic permeability (default 1 everywhere) :return: overlap_e for calculating the mode overlap """ + slices = tuple(slices) + cross_plane = [slice(None)] * 3 cross_plane[axis] = slices[axis]