I am having trouble with `permute!`, the in-place version of `permutedims`. 
I tried the following:

A = rand(Float32, 20, 30, 40, 2);

permute!(A, [1;2;3;4])

which produced the following:

ERROR: BoundsError()
 in permute!! at combinatorics.jl:196
 in permute! at combinatorics.jl:212

Strangely, executing the the in-place version,

permutedims(A, [1;2;3;4])

works fine, giving the correct result.

What is going on here?

Reply via email to