天天看點

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

平方根法求解線性方程組

import numpy as np


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