Hermite श्रृंखला को x से गुणा करने के लिए, जहां x स्वतंत्र चर है, Python Numpy में thepolynomial.hermite.hermmulx() विधि का उपयोग करें। विधि गुणन के परिणाम का प्रतिनिधित्व करने वाली एक सरणी देता है। पैरामीटर, c हरमाइट श्रृंखला के गुणांकों की एक 1-डी सरणी है जिसे निम्न से उच्च तक क्रमित किया गया है।
कदम
सबसे पहले, आवश्यक पुस्तकालय आयात करें -
import numpy as np from numpy.polynomial import hermite as H
एक सरणी बनाएं -
c = np.array([1, 2, 3])
सरणी प्रदर्शित करें -
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) हर्मिट श्रृंखला को x से गुणा करने के लिए, जहां x स्वतंत्र चर है, thepolynomial.hermite.hermmulx() विधि का उपयोग करें -
print("\nResult....\n",H.hermmulx(c)) उदाहरण
import numpy as np
from numpy.polynomial import hermite as H
# Create an array
c = np.array([1, 2, 3])
# Display the array
print("Our Array...\n",c)
# Check the Dimensions
print("\nDimensions of our Array...\n",c.ndim)
# Get the Datatype
print("\nDatatype of our Array object...\n",c.dtype)
# Get the Shape
print("\nShape of our Array object...\n",c.shape)
# To multiply the Hermite series by x, where x is the independent variable, use the polynomial.hermite.hermmulx() method in Python Numpy
print("\nResult....\n",H.hermmulx(c)) आउटपुट
Our Array... [1 2 3] Dimensions of our Array... 1 Datatype of our Array object... int64 Shape of our Array object... (3,) Result.... [2. 6.5 1. 1.5]