擅长:python、mysql、java
<p>作为np.根依靠文档中所述的“寻找伴随矩阵的特征值”,您可能会遇到错误传播问题,导致根上的虚部非零。也许你可以用np.实数功能。在</p>
<p>您可以尝试使用根的泰勒近似法来计算根:</p>
<p><a href="https://math.stackexchange.com/questions/12160/roots-of-legendre-polynomial">https://math.stackexchange.com/questions/12160/roots-of-legendre-polynomial</a></p>