Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在尝试使用 python 计算矩阵的逆时,出现numpy.linalg.inv(matrix)奇异矩阵错误。为什么会这样?是否与矩阵中值的小有关。我的矩阵中的数字是概率,加起来为 1。
numpy.linalg.inv(matrix)
这很可能与矩阵中值的小有关。
事实上,一些在数学上不是奇异的矩阵(行列式为零)从实际的角度来看是完全奇异的,因为使用的数学库无法正确处理它们。
如您所知,数值分析很棘手,它处理这种情况的能力是衡量矩阵库质量的标准。