It is very likely that it is my lack of math skills that is showing up here. However, I think Transpose
is such an important function that I need to master it. So I am going to ask because I do not understand the information given in the documentation.
Transpose[list,{Subscript[n, 1], Subscript[n, 2], …}] transposes list so that the k-th level in list is the Subscript[n, k]-th level in the result.
Would anyone be able to provide a simple example and point out in a matrix what is going on? I am in particular struggling with the nth and k-th level. How does that work?
I want to master Transpose[list, {…}]
. Please explain the case where the k-th and n-th level are to be transposed, since this is where I am struggling.
If this is considered mathematical question, and therefore not in the right place, I would appreciate a comment so that I could delete the post.
Scope
section of the function in the documentation. Look at the results (the pattern of indexes in particular) of those results, should be clear. $\endgroup$Transpose[$m, {3, 2, 1}] === Flatten[$m, {{3}, {2}, {1}}]
, so you might find this discussion of Flatten useful. $\endgroup$