use Structures : all; inline int[+] rotrXII(int[+] y) {/* Last axis reverse on rank>1 */ cellshape = take([-1], shape(y)); frameshape = drop([-1],shape(y)); cell = genarray(cellshape, 0); z = with { ( . <= iv <= .) : (y[iv]); } : genarray(frameshape, cell); return(z); } int main() { m=_reshape_VxA_([2, 3],[0,1,2,3,4,5]); A_354=rotrXII( m); z = m; z[[]] = A_354; A_360=_reshape_VxA_([2, 3],[2, 1, 0, 5, 4, 3]); A_362=Array::match(z,A_360); StdIO::print(A_362); return(0); }