numpy.polynomial.hermite_e.HermiteE.degree#
方法
- polynomial.hermite_e.HermiteE.degree()[原始碼]#
級數的次數。
- 返回:
- degreeint
級數的次數,比係數的數量少一。
範例
為
1 + 7*x + 4*x**2
建立多項式物件>>> poly = np.polynomial.Polynomial([1, 7, 4]) >>> print(poly) 1.0 + 7.0·x + 4.0·x² >>> poly.degree() 2
請注意,此方法不會檢查非零係數。您必須修剪多項式以移除任何尾隨零
>>> poly = np.polynomial.Polynomial([1, 7, 0]) >>> print(poly) 1.0 + 7.0·x + 0.0·x² >>> poly.degree() 2 >>> poly.trim().degree() 1