本文簡要介紹 python 語言中 numpy.polynomial.legendre.legroots
的用法。
用法:
polynomial.legendre.legroots(c)
計算勒讓德級數的根。
返回多項式的根 (a.k.a. “zeros”)
- c: 一維 數組
一維係數數組。
- out: ndarray
係列的根數組。如果所有的根都是實數,那麽 out 也是實數,否則就是複數。
參數:
返回:
注意:
根估計是作為伴生矩陣的特征值獲得的,由於這些值的序列的數值不穩定性,遠離複平麵原點的根可能有很大的誤差。重數大於 1 的根也將顯示較大的誤差,因為這些點附近的序列值對根中的誤差相對不敏感。可以通過牛頓方法的幾次迭代來改進原點附近的孤立根。
Legendre 級數基多項式不是
x
的冪,因此該函數的結果可能看起來不直觀。例子:
>>> import numpy.polynomial.legendre as leg >>> leg.legroots((1, 2, 3, 4)) # 4L_3 + 3L_2 + 2L_1 + 1L_0, all real roots array([-0.85099543, -0.11407192, 0.51506735]) # may vary
相關用法
- Python numpy legendre.legint用法及代碼示例
- Python numpy legendre.legmulx用法及代碼示例
- Python numpy legendre.legdomain用法及代碼示例
- Python numpy legendre.legfromroots用法及代碼示例
- Python numpy legendre.leg2poly用法及代碼示例
- Python numpy legendre.legone用法及代碼示例
- Python numpy legendre.legdiv用法及代碼示例
- Python numpy legendre.legmul用法及代碼示例
- Python numpy legendre.legadd用法及代碼示例
- Python numpy legendre.legline用法及代碼示例
- Python numpy legendre.legx用法及代碼示例
- Python numpy legendre.legtrim用法及代碼示例
- Python numpy legendre.legfit用法及代碼示例
- Python numpy legendre.legsub用法及代碼示例
- Python numpy legendre.legder用法及代碼示例
- Python numpy legendre.legzero用法及代碼示例
- Python numpy legendre.poly2leg用法及代碼示例
- Python numpy less用法及代碼示例
- Python numpy lexsort用法及代碼示例
- Python numpy left_shift用法及代碼示例
- Python numpy less_equal用法及代碼示例
- Python numpy linalg.svd用法及代碼示例
- Python numpy laguerre.lagone用法及代碼示例
- Python numpy linalg.pinv用法及代碼示例
- Python numpy logaddexp用法及代碼示例
注:本文由純淨天空篩選整理自numpy.org大神的英文原創作品 numpy.polynomial.legendre.legroots。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。