numpy determinant python matrix\ code example
Example 1: numpy determinant python matrix
numpy.linalg.det(array)
Example 2: python matrix determinant without numpy
def det(matrix):
order=len(matrix)
posdet=0
for i in range(order):
posdet+=reduce((lambda x, y: x * y), [matrix[(i+j)%order][j] for j in range(order)])
negdet=0
for i in range(order):
negdet+=reduce((lambda x, y: x * y), [matrix[(order-i-j)%order][j] for j in range(order)])
return posdet-negdet