Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

transpose a matrix using list comprehension

MT = [[0,0,0], [0,0,0], [0,0,0]]
for ir in range(3):
    for ic in range(3):
        MT[ic][ir] = M[ir][ic]
Source by scipython.com #
 
PREVIOUS NEXT
Tagged: #transpose #matrix #list #comprehension
ADD COMMENT
Topic
Name
9+5 =