@@ -760,6 +760,8 @@ def convolve(signal, kernel):
760
760
>>> list(convolve([1, -1, -20], [1, -3]))
761
761
[1, -4, -17, 60]
762
762
763
+ Note that polynomial coefficients are specified in descending power order.
764
+
763
765
Examples of popular kinds of kernels:
764
766
765
767
* The kernel ``[0.25, 0.25, 0.25, 0.25]`` computes a moving average.
@@ -905,6 +907,8 @@ def polynomial_from_roots(roots):
905
907
>>> polynomial_from_roots(roots) # x³ - 4 x² - 17 x + 60
906
908
[1, -4, -17, 60]
907
909
910
+ Note that polynomial coefficients are specified in descending power order.
911
+
908
912
Supports all numeric types: int, float, complex, Decimal, Fraction.
909
913
"""
910
914
# This recipe differs from the one in itertools docs in that it
@@ -1112,6 +1116,8 @@ def polynomial_eval(coefficients, x):
1112
1116
>>> polynomial_eval(coefficients, x)
1113
1117
8.125
1114
1118
1119
+ Note that polynomial coefficients are specified in descending power order.
1120
+
1115
1121
Supports all numeric types: int, float, complex, Decimal, Fraction.
1116
1122
"""
1117
1123
n = len (coefficients )
@@ -1142,6 +1148,8 @@ def polynomial_derivative(coefficients):
1142
1148
>>> derivative_coefficients
1143
1149
[3, -8, -17]
1144
1150
1151
+ Note that polynomial coefficients are specified in descending power order.
1152
+
1145
1153
Supports all numeric types: int, float, complex, Decimal, Fraction.
1146
1154
"""
1147
1155
n = len (coefficients )
0 commit comments