cmatrix.Matrix.transpose¶
- Matrix.transpose()¶
Transpose the self Matrix.
- Returns
- Matrix
The transposed matrix
Examples
>>> t=Matrix(3,3,0) >>> for i in range(0,3): ... for j in range(0,3): ... t.set_ij(i,j,i*j+i) ... >>> Print(t) | +0.000 | +0.000 | +0.000 | | +1.000 | +2.000 | +3.000 | | +2.000 | +4.000 | +6.000 | printed >>> tr=t.transpose() >>> Print(tr) | +0.000 | +1.000 | +2.000 | | +0.000 | +2.000 | +4.000 | | +0.000 | +3.000 | +6.000 | printed