Deprecated: Automatic conversion of false to array is deprecated in /home/sickgaming/domains/sickgaming.net/public_html/inc/functions.php on line 2432 [Tut] NumPy polymulx()
The numpy.polymulx function multiplies the polynomial c with a value x which is the independent variable.
Arguments
Type
Description
c
array_like or poly1d object
The input polynomials to be multiplied
The following table shows the return value of the function:
Type
Description
Return Value
ndarray or poly1d object
The polynomial resulting from the multiplication of the inputs. If either inputs is a poly1d object, then the output is also a poly1d object. Otherwise, it is a 1D array of polynomial coefficients from highest to lowest degree.
Let’s dive into some examples to show how the function is used in practice:
This function is inspired from this Github repository.
Any master coder has a “hands-on” mentality with a bias towards action. Try it yourself—play with the function in the following interactive code shell:
Exercise: Change the parameters of your polynomials and print them without the comparisons. Do you understand where they come from?