A = sparse.csc_matrix([[1., 5., 0.], [5., 0., 2.], [0., 2., 0.]], dtype=float)
B = linalg.spilu(A) #不完全LU分解
b = np.array([1., 2., 3.], dtype=float)
x=B.solve(b) # solve函数求解Ax=b
B的类型是SuprLU
scipy.sparse.linalg.SuperLU — SciPy v1.7.1 Manual
Sparse linear algebra (scipy.sparse.linalg) — SciPy v1.7.1 Manual
循环矩阵的生成和求解