>>> matrix_multiply(matrix_1_to_4, matrix_5_to_8) [[19, 22], [43, 50]]
(matrix_a: Matrix, matrix_b: Matrix)
| 69 | |
| 70 | |
| 71 | def matrix_multiply(matrix_a: Matrix, matrix_b: Matrix) -> Matrix: |
| 72 | """ |
| 73 | >>> matrix_multiply(matrix_1_to_4, matrix_5_to_8) |
| 74 | [[19, 22], [43, 50]] |
| 75 | """ |
| 76 | return [ |
| 77 | [sum(a * b for a, b in zip(row, col)) for col in zip(*matrix_b)] |
| 78 | for row in matrix_a |
| 79 | ] |
| 80 | |
| 81 | |
| 82 | def matrix_multiply_recursive(matrix_a: Matrix, matrix_b: Matrix) -> Matrix: |
no outgoing calls
no test coverage detected