MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / main

Function main

matrix/matrix_operation.py:186–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184
185
186def main() -> None:
187 matrix_a = [[12, 10], [3, 9]]
188 matrix_b = [[3, 4], [7, 4]]
189 matrix_c = [[11, 12, 13, 14], [21, 22, 23, 24], [31, 32, 33, 34], [41, 42, 43, 44]]
190 matrix_d = [[3, 0, 2], [2, 0, -2], [0, 1, 1]]
191 print(f"Add Operation, {add(matrix_a, matrix_b) = } \n")
192 print(f"Multiply Operation, {multiply(matrix_a, matrix_b) = } \n")
193 print(f"Identity: {identity(5)}\n")
194 print(f"Minor of {matrix_c} = {minor(matrix_c, 1, 2)} \n")
195 print(f"Determinant of {matrix_b} = {determinant(matrix_b)} \n")
196 print(f"Inverse of {matrix_d} = {inverse(matrix_d)}\n")
197
198
199if __name__ == "__main__":

Callers 1

Calls 6

minorFunction · 0.85
determinantFunction · 0.85
inverseFunction · 0.85
addFunction · 0.70
multiplyFunction · 0.70
identityFunction · 0.70

Tested by

no test coverage detected