Untranspose method

In some cases, for higher dimensional tensor arrays it is not obvious how a transposition can be undone. This function adds a simple helper function for that.