(m)
return det
Computes the determinant of the square matrix :math:`M` via LUP decomposition.

    :param m: input matrix
    :type m: list, tuple
    :return: determinant of the matrix
    :rtype: float
Computes the determinant of the square matrix :math:`M` via LUP decomposition.
Computes the determinant of the square matrix : math : M via LUP decomposition .
def matrix_determinant(m):
    """ Computes the determinant of the square matrix :math:`M` via LUP decomposition.

    :param m: input matrix
    :type m: list, tuple
    :return: determinant of the matrix
    :rtype: float
    """
    mp, p, sign = matrix_pivot(m, sign=True)
    m_l, m_u = lu_decomposition(mp)
    det = 1.0
    for i in range(len(m)):
        det *= m_l[i][i] * m_u[i][i]
    det *= sign
    return det
def matrix_determinant ( m ) : mp , p , sign = matrix_pivot ( m , sign = True ) m_l , m_u = lu_decomposition ( mp ) det = 1.0 for i in range ( len ( m ) ) : det *= m_l [ i ] [ i ] * m_u [ i ] [ i ] det *= sign return det