Next: , Previous: subgrid, Up: Composition functions


4.3.4.12 transpose
— Function: grid:transpose grid &key indices destination start

Transpose the grid, optionally putting the result in destination at the element specified by the start indices.

The function transpose exchange elements paired by exchange of indices. The grid can be of any rank greater than or equal to 2. For example, the transpose of the above array is
     ANTIK-USER> (grid::test-grid-double-float 'array '(3 4))
     #2A((0.0 1.0 2.0 3.0) (10.0 11.0 12.0 13.0) (20.0 21.0 22.0 23.0))
     ANTIK-USER> (transpose @)
     #2A((0.0 10.0 20.0) (1.0 11.0 21.0) (2.0 12.0 22.0) (3.0 13.0 23.0))