Generalized transpose; fixed test input