chickadee » srfi-179 » array-rotate

array-rotate array dimprocedure

Informally, (array-rotate array dim) rotates the axes of array dim places to the left.

More precisely, (array-rotate array dim) assumes that array is an array and dim is an exact integer between 0 (inclusive) and (array-dimension array) (exclusive). It computes the permutation (vector dim ... (- (array-dimension array) 1) 0 ... (- dim 1)) (unless dim is zero, in which case it constructs the identity permutation) and returns (array-permute array permutation). It is an error if the arguments do not satisfy these conditions.