scipy.special --- ฟังก์ชันพิเศษ¶
โมดูลย่อย scipy.special จัดเตรียมฟังก์ชันคณิตศาสตร์พิเศษแบบ element-wise เหมือนกับฟังก์ชันสากลใน numpy ทุกรูทีนรับสเกลาร์, iterable ที่มีค่าสเกลาร์ (range, list, tuple), หรือ numpy.ndarray และคืน numpy.ndarray ใหม่ที่มี dtype เป็น float
ฟังก์ชัน¶
- scipy.special.erf(x: ndarray | Iterable[float] | float) ndarray¶
ฟังก์ชัน Gauss error แบบ element-wise,
erf(x) = (2 / sqrt(pi)) * integral(exp(-t**2), 0, x)- พารามิเตอร์:
x -- สเกลาร์, iterable ที่มีค่าสเกลาร์, หรือ
numpy.ndarray- ค่าที่คืน:
numpy.ndarrayแบบ float ที่มีรูปร่างเดียวกับอินพุต
- scipy.special.erfc(x: ndarray | Iterable[float] | float) ndarray¶
ฟังก์ชัน complementary error แบบ element-wise,
erfc(x) = 1 - erf(x)คำนวณในลักษณะที่รักษาความแม่นยำสำหรับค่า x ขนาดใหญ่- พารามิเตอร์:
x -- สเกลาร์, iterable ที่มีค่าสเกลาร์, หรือ
numpy.ndarray- ค่าที่คืน:
numpy.ndarrayแบบ float ที่มีรูปร่างเดียวกับอินพุต
- scipy.special.gamma(x: ndarray | Iterable[float] | float) ndarray¶
ฟังก์ชัน Gamma แบบ element-wise
- พารามิเตอร์:
x -- สเกลาร์, iterable ที่มีค่าสเกลาร์, หรือ
numpy.ndarray- ค่าที่คืน:
numpy.ndarrayแบบ float ที่มีรูปร่างเดียวกับอินพุต
- scipy.special.gammaln(x: ndarray | Iterable[float] | float) ndarray¶
ลอการิทึมธรรมชาติของค่าสัมบูรณ์ของฟังก์ชัน Gamma แบบ element-wise
- พารามิเตอร์:
x -- สเกลาร์, iterable ที่มีค่าสเกลาร์, หรือ
numpy.ndarray- ค่าที่คืน:
numpy.ndarrayแบบ float ที่มีรูปร่างเดียวกับอินพุต