Added a more elegant (but more cryptic) solution with reshape and swapaxes. Removed one of the existing alternative solutions because it was a duplicate of a previous alternative solution.
32 KiB
32 KiB