This message is generated when a degenerate permutation specification in Transpose is used to collapse the dimensions of a matrix and the specified dimensions do not have the same length.
Off[message] switches off the message; On[message] switches it on. For example: Off[Transpose::diagnl].
Examples
Basic Examples(1)
An error occurs because the dimensions to be combined do not have the same length:
This permutation specification can be used to pick out the diagonal elements in a square matrix: