天天看点

Python解线性方程组的直接法(5)————平方根法求解线性方程组平方根法求解线性方程组

平方根法求解线性方程组

import numpy as np


def pingfagenfa(a):
    n = a.shape[0]
    g = np.mat(np.zeros((n, n), dtype