Để nhân một chuỗi Laguerre với một biến độc lập, hãy sử dụng phương thức polynomial.laguerre.lagmulx () trong Python. Nhân chuỗi Laguerre c với x, trong đó x là biến độc lập. Theparameter c là mảng 1-D gồm các hệ số chuỗi Laguerre được sắp xếp từ thấp đến cao.
Các bước
Đầu tiên, hãy nhập thư viện được yêu cầu -
import numpy as np from numpy.polynomial import laguerre as L
Tạo một mảng -
c = np.array([1, 2, 3])
Hiển thị mảng -
print("Our Array...\n",c) Kiểm tra các thứ nguyên -
print("\nDimensions of our Array...\n",c.ndim) Lấy Datatype -
print("\nDatatype of our Array object...\n",c.dtype) Lấy hình dạng -
print("\nShape of our Array object...\n",c.shape) Để nhân một chuỗi Laguerre với một biến độc lập, hãy sử dụng phương thức polynomial.laguerre.lagmulx () trong Python -
print("\nResult....\n",L.lagmulx(c)) Ví dụ
import numpy as np
from numpy.polynomial import laguerre as L
# 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 a Laguerre series by an independent variable, use the polynomial.laguerre.lagmulx() method in Python Numpy
print("\nResult....\n",L.lagmulx(c)) Đầu ra
Our Array... [1 2 3] Dimensions of our Array... 1 Datatype of our Array object... int64 Shape of our Array object... (3,) Result.... [-1. -1. 11. -9.]