From 33968c72e93ea6ec6597a4ce560aae3969a07bc8 Mon Sep 17 00:00:00 2001 From: lkcl Date: Mon, 7 Oct 2019 12:53:05 +0100 Subject: [PATCH] --- simple_v_extension/remap.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simple_v_extension/remap.mdwn b/simple_v_extension/remap.mdwn index afccb13c3..8447b6907 100644 --- a/simple_v_extension/remap.mdwn +++ b/simple_v_extension/remap.mdwn @@ -80,10 +80,11 @@ shows this more clearly, and may be executed as a python program: idxs = [0,0,0] # starting indices order = [1,0,2] # experiment with different permutations, here offs = 0 # experiment with different offsets, here + modulo = 64 # set different modulus, here for idx in range(xdim * ydim * zdim): new_idx = offs + idxs[0] + idxs[1] * xdim + idxs[2] * xdim * ydim - print new_idx, + print new_idx % modulo for i in range(3): idxs[order[i]] = idxs[order[i]] + 1 if (idxs[order[i]] != lims[order[i]]): -- 2.30.2