ary.transpose â new_ary
Instance Public methods
Assumes that self
is an array of arrays and transposes the
rows and columns.
1 2 | a = [[ 1 , 2 ], [ 3 , 4 ], [ 5 , 6 ]] a.transpose #=> [[1, 3, 5], [2, 4, 6]] |
If the length of the subarrays don't match, an IndexError is raised.
Please login to continue.