Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Python

ประเมินอนุกรม Hermite_e 2 มิติ ที่จุด (x,y) ใน Python

บทนำ

เมธอด hermite_e.hermeval2d() ประเมินอนุกรม Hermite_e 2 มิติ ที่จุด (x, y) ด้วยสัมประสิทธิ์ 2 มิติ

ตัวอย่าง: สัมประสิทธิ์ 2 มิติ (2,2)

import numpy as np
from numpy.polynomial import hermite_e as H

c = np.arange(4).reshape(2, 2)
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...\n", H.hermeval2d([1, 2], [1, 2], c))

ผลลัพธ์

Our Array... [[0 1]
 [2 3]]
Dimensions of our Array... 2
Datatype of our Array object... int64
Shape of our Array object... (2, 2)
Result... [ 6. 18.]

อนุกรม 2 มิติประเมินที่จุด (1,1) และ (2,2) ให้ผลลัพธ์ 2 ค่า