本文簡要介紹 python 語言中 numpy.polynomial.legendre.legdiv
的用法。
用法:
polynomial.legendre.legdiv(c1, c2)
將一個勒讓德係列除以另一個。
返回兩個勒讓德係列的quotient-with-remainderc1/c2。參數是從最低階 “term” 到最高階的係數序列,例如,[1,2,3] 表示序列
P_0 + 2*P_1 + 3*P_2
.- c1, c2: array_like
勒讓德級數係數的一維數組從低到高排序。
- quo, rem: ndarray
代表商和餘數的勒讓德級數係數。
參數:
返回:
注意:
通常,一個勒讓德級數的(多項式)除以另一個勒讓德級數會產生不在勒讓德多項式基組中的商和餘項。因此,要將這些結果表示為勒讓德級數,有必要將結果“reproject” 放到勒讓德基組上,這可能會產生“unintuitive”(但正確)的結果;請參閱下麵的示例部分。
例子:
>>> from numpy.polynomial import legendre as L >>> c1 = (1,2,3) >>> c2 = (3,2,1) >>> L.legdiv(c1,c2) # quotient "intuitive," remainder not (array([3.]), array([-8., -4.])) >>> c2 = (0,1,2,3) >>> L.legdiv(c2,c1) # neither "intuitive" (array([-0.07407407, 1.66666667]), array([-1.03703704, -2.51851852])) # may vary
相關用法
- Python numpy legendre.legdomain用法及代碼示例
- Python numpy legendre.legder用法及代碼示例
- Python numpy legendre.legint用法及代碼示例
- Python numpy legendre.legmulx用法及代碼示例
- Python numpy legendre.legroots用法及代碼示例
- Python numpy legendre.legfromroots用法及代碼示例
- Python numpy legendre.leg2poly用法及代碼示例
- Python numpy legendre.legone用法及代碼示例
- 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.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.legdiv。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。