เมธอด hermite.herm2poly() แปลงอนุกรมเฮอร์ไมท์กลับเป็นพหุนามมาตรฐาน (standard basis)
ขั้นตอน
import numpy as np
from numpy.polynomial import hermite as H
c = np.array([1, 2, 3, 4, 5])
print("Our Array...\n", c)
print("\nDimensions of our Array...\n", c.ndim)
print("\nDatatype of our Array object...\n", c.dtype)
print("\nShape of our Array object...\n", c.shape)
print("\nResult (hermite to polynomial)...\n", H.herm2poly(c))
ตัวอย่างโค้ดสมบูรณ์
import numpy as np
from numpy.polynomial import hermite as H
c = np.array([1, 2, 3, 4, 5])
print("Our Array...\n", c)
print("\nDimensions of our Array...\n", c.ndim)
print("\nDatatype of our Array object...\n", c.dtype)
print("\nShape of our Array object...\n", c.shape)
print("\nResult (hermite to polynomial)...\n", H.herm2poly(c))
ผลลัพธ์
Our Array... [1 2 3 4 5] Dimensions of our Array... 1 Datatype of our Array object... int64 Shape of our Array object... (5,) Result (hermite to polynomial)... [ 55. -44. -228. 32. 80.]