Python矩阵计算常用操作总结 1. 导入 NumPy 库 import numpy as np 📌 NumPy 是 Python 中处理矩阵和数值计算的标准库。必须先导入。 2. 创建矩阵 A = np.array([[1, 2], [3, 4]]) B = np.array([