怎么会呢纽比.利纳格.艾格决定特征值返回的顺序?

2024-04-24 22:52:28 发布

您现在位置:Python中文网/ 问答频道 /正文

当我使用numpy.linalg.eig

eValues, eVectors = numpy.linalg.eig(someMatrix)

返回的评估值几乎按降序排列。在

怎么会呢纽比.利纳格.艾格决定特征值返回的顺序?在


Tags: numpy顺序特征值linalg降序eig纳格somematrix
1条回答
网友
1楼 · 发布于 2024-04-24 22:52:28

纽比对此不作任何保证-

docstring

Returns
   -
w : (..., M) array
    The eigenvalues, each repeated according to its multiplicity.
    The eigenvalues are not necessarily ordered. The resulting
    array will be always be of complex type. When `a` is real
    the resulting eigenvalues will be real (0 imaginary part) or
    occur in conjugate pairs

Numpy将此计算委托给LAPACK,因此如果有任何一致的顺序,您应该考虑它的实现细节,而不是依赖它。在

相关问题 更多 >