New at python and rusty on linear Algebra. However, I am looking for guidance on the correct way to create a determinant from a matrix in python without using Numpy. Please see the snippet of code below. Any assistance is greatly appreciated.
import math
from math import sqrt
import numbers
import operatorsdef determinant(self)if not self.is_square():raise(ValueError, "Cannot calculate determinant of non-square matrix.")if self.h > 2:raise(NotImplementedError, "Calculating determinant not implemented for matrices larger than 2x2.")|x| = Adet(A) = [[A, B][C, D]]assert self.rows == A.colsassert self.row > 1term_list = []