Fast matrix transposition in Python

Posted by psihodelia on Stack Overflow See other posts from Stack Overflow or by psihodelia
Published on 2010-05-27T13:50:25Z Indexed on 2010/05/27 13:51 UTC
Read the original article Hit count: 137

Filed under:
|
|

Is there any fast method to make a transposition of a rectangular 2D matrix in Python (non-involving any library import).? Say, if I have an array X=[[1,2,3], [4,5,6]] I need an array Y which should be a transposed version of X, so Y=[[1,4],[2,5],[3,6]].

© Stack Overflow or respective owner

Related posts about python

Related posts about algorithm