From 3f8802cb5fb635c05e6f0b474b333f16b6961246 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 29 Jul 2024 00:31:44 -0700 Subject: [PATCH] use strict zip --- meanas/fdmath/operators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meanas/fdmath/operators.py b/meanas/fdmath/operators.py index fe9847b..b5cd8fc 100644 --- a/meanas/fdmath/operators.py +++ b/meanas/fdmath/operators.py @@ -35,7 +35,7 @@ def shift_circ( raise Exception(f'Invalid direction: {axis}, shape is {shape}') shifts = [abs(shift_distance) if a == axis else 0 for a in range(3)] - shifted_diags = [(numpy.arange(n) + s) % n for n, s in zip(shape, shifts)] + shifted_diags = [(numpy.arange(n) + s) % n for n, s in zip(shape, shifts, strict=True)] ijk = numpy.meshgrid(*shifted_diags, indexing='ij') n = numpy.prod(shape) @@ -83,7 +83,7 @@ def shift_with_mirror( return v shifts = [shift_distance if a == axis else 0 for a in range(3)] - shifted_diags = [mirrored_range(n, s) for n, s in zip(shape, shifts)] + shifted_diags = [mirrored_range(n, s) for n, s in zip(shape, shifts, strict=True)] ijk = numpy.meshgrid(*shifted_diags, indexing='ij') n = numpy.prod(shape)