(matrix)
| 33 | return outMatrix |
| 34 | |
| 35 | def matrixTrans(matrix): |
| 36 | m, n = shape(matrix) |
| 37 | triple = sparseToTriple(matrix) |
| 38 | transedTriple = transTriple(triple) |
| 39 | transedMatrix = tripleToSparse(transedTriple, m, n) |
| 40 | return transedMatrix |
| 41 | |
| 42 | matrix = [[0, 0, 0, 0, 0, 0, 6, 0, 0], |
| 43 | [0, 0, 2, 0, 0, 1, 0, 0, 0], |
no test coverage detected