LU分解
在线性代数中, LU分解(LU Decomposition)是矩阵分解的一种,可以将一个矩阵分解为一个单位下三角矩阵和一个上三角矩阵的乘积(有时是它们和一个置换矩阵的乘积)。LU分解主要应用在数值分析中,用来解线性方程、求反矩阵或计算行列式。
python LU分解
# lower–upper (LU) decomposition - https://en.wikipedia.org/wiki/LU_decomposition
import numpy
def LUDecompose(table):
# Table that contains our data
# Table has to be a square array so