masdeseiscaracteres
8/23/2017 - 1:28 PM

Indexing and clock arithmetic

Indexing and clock arithmetic

Correspondence between indexing and clock arithmetic.

Python

N = 6
L[np.arange(0,len(L)*N,1)%len(L)]

Octave

N = 6
L(mod(0:N*length(L)-1,length(L))+1)