摘要: import numpy as np def steady_distribution(A, b, max_iter=100): y = A @ b count = 1 while not (y == b).all() and count < max_iter: print(y) b = y y = 阅读全文
posted @ 2024-06-23 19:35 crazypigf 阅读(33) 评论(0) 推荐(0)
摘要: # 矩阵乘法 def mul_matrix(A, B): A_rows = len(A) A_cols = len(A[0]) B_rows = len(B) B_cols = len(B[0]) if A_cols != B_rows: raise Exception('Matrix A colu 阅读全文
posted @ 2024-06-23 12:01 crazypigf 阅读(48) 评论(0) 推荐(0)