Hermite_e বহুপদীর একটি Vandermonde ম্যাট্রিক্স তৈরি করতে, Python Numpy-এ hermite_e.hermvander() ব্যবহার করুন। পদ্ধতিটি সিউডো-ভ্যান্ডেরমন্ড ম্যাট্রিক্স প্রদান করে। রিটার্নডম্যাট্রিক্সের আকৃতি হল x.shape + (deg + 1,), যেখানে শেষ সূচকটি সংশ্লিষ্ট হারমাইটপলিনোমিয়ালের ডিগ্রি। dtype রূপান্তরিত x এর মতই হবে।
প্যারামিটার, x পয়েন্টের একটি অ্যারে প্রদান করে। কোনো উপাদান জটিল কিনা তার উপর নির্ভর করে dtype float64 বা complex128-এ রূপান্তরিত হয়। যদি x স্কেলার হয় তবে এটি একটি 1-D অ্যারেতে রূপান্তরিত হয়৷ প্যারামিটার, deg হল ফলাফল ম্যাট্রিক্সের ডিগ্রি৷
পদক্ষেপ
প্রথমে, প্রয়োজনীয় লাইব্রেরি আমদানি করুন -
import numpy as np from numpy.polynomial import hermite_e as H
একটি অ্যারে তৈরি করুন -
x = np.array([0, 3.5, -1.4, 2.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) Hermite_e বহুপদীর একটি Vandermonde ম্যাট্রিক্স তৈরি করতে, hermite_e.hermvander() পদ্ধতি ব্যবহার করুন −
print("\nResult...\n",H.hermevander(x, 2)) উদাহরণ
import numpy as np
from numpy.polynomial import hermite_e as H
# Create an array
x = np.array([0, 3.5, -1.4, 2.5])
# Display the array
print("Our Array...\n",x)
# Check the Dimensions
print("\nDimensions of our Array...\n",x.ndim)
# Get the Datatype
print("\nDatatype of our Array object...\n",x.dtype)
# Get the Shape
print("\nShape of our Array object...\n",x.shape)
# To generate a Vandermonde matrix of the Hermite_e polynomial, use the hermite_e.hermvander() in Python Numpy
print("\nResult...\n",H.hermevander(x, 2)) আউটপুট
Our Array... [ 0. 3.5 -1.4 2.5] Dimensions of our Array... 1 Datatype of our Array object... float64 Shape of our Array object... (4,) Result... [[ 1. 0. -1. ] [ 1. 3.5 11.25] [ 1. -1.4 0.96] [ 1. 2.5 5.25]]