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

Function minor

matrix/matrix_operation.py:116–122  ·  view source on GitHub ↗

>>> minor([[1, 2], [3, 4]], 1, 1) [[1]]

(matrix: list[list[int]], row: int, column: int)

Source from the content-addressed store, hash-verified

114
115
116def minor(matrix: list[list[int]], row: int, column: int) -> list[list[int]]:
117 """
118 >>> minor([[1, 2], [3, 4]], 1, 1)
119 [[1]]
120 """
121 minor = matrix[:row] + matrix[row + 1 :]
122 return [row[:column] + row[column + 1 :] for row in minor]
123
124
125def determinant(matrix: list[list[int]]) -> Any:

Callers 3

determinantFunction · 0.85
inverseFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected