mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Fixes unused variable errors in LGTM (#1746)
* Fixes unsed variable errors in LGTM * Fixes integer check * Fixes failing tests
This commit is contained in:
@ -111,12 +111,9 @@ def inverse(matrix):
|
||||
|
||||
|
||||
def _check_not_integer(matrix):
|
||||
try:
|
||||
rows = len(matrix)
|
||||
cols = len(matrix[0])
|
||||
if not isinstance(matrix, int) and not isinstance(matrix[0], int):
|
||||
return True
|
||||
except TypeError:
|
||||
raise TypeError("Cannot input an integer value, it must be a matrix")
|
||||
raise TypeError("Expected a matrix, got int/list instead")
|
||||
|
||||
|
||||
def _shape(matrix):
|
||||
|
Reference in New Issue
Block a user