
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
Multiply a Chebyshev series by an independent variable in Python
To multiply a Chebyshev series by an independent variable, use the polynomial.chebyshev.chebmulx() method in Python Numpy. The method returns an array representing the result of the multiplication. The parameters c1 and c2 are 1-D arrays of Chebyshev series coefficients ordered from low to high.
Steps
At first, import the required libraries -
import numpy as np from numpy.polynomial import chebyshev as C
Create an array −
x = np.array([1, 2, 3])
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 multiply a Chebyshev series by an independent variable, use the polynomial.chebyshev.chebmulx() method −
print("\nResult....\n",C.chebmulx(x))
Example
import numpy as np from numpy.polynomial import chebyshev as C # Create an array x = np.array([1, 2, 3]) # 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 multiply a Chebyshev series by an independent variable, use the polynomial.chebyshev.chebmulx() method in Python Numpy # The method returns an array representing the result of the multiplication. print("\nResult....\n",C.chebmulx(x))
Output
Our Array... [1 2 3] Dimensions of our Array... 1 Datatype of our Array object... int64 Shape of our Array object... (3,) Result.... [1. 2.5 1. 1.5]
- Related Articles
- Multiply a Hermite series by an independent variable in Python
- Multiply a Laguerre series by an independent variable in Python
- Multiply a Legendre series by an independent variable in Python
- Multiply a Hermite_e series by an independent variable in Python
- Differentiate a Chebyshev series and multiply each differentiation by a scalar in Python
- Multiply one Chebyshev series to another in Python
- Differentiate a Chebyshev series, set the derivatives and multiply each differentiation by a scalar in Python
- Integrate a Chebyshev series and multiply the result by a scalar before the integration constant is added in Python
- Divide one Chebyshev series by another in Python
- Integrate a Chebyshev series in Python
- Differentiate a Chebyshev series in Python
- Convert a Chebyshev series to a polynomial in Python
- Convert a polynomial to a Chebyshev series in Python
- Raise a Chebyshev series to a power in Python
- Compute the roots of a Chebyshev series in Python

Advertisements