原文:https://docs.scipy.org/doc/numpy/reference/generated/numpy.polynomial.polynomial.polyder.html
校对:(虚位以待)
numpy.polynomial.polynomial.
polyder
(c, m=1, scl=1, axis=0)[source]区分多项式。
返回沿轴的多项式系数c微分m在每次迭代时,结果乘以scl(比例因子用于变量的线性变化)。The argument c is an array of coefficients from low to high degree along each axis, e.g., [1,2,3] represents the polynomial 1 + 2*x + 3*x**2
while [[1,2],[1,2]] represents 1 + 1*x + 2*y + 2*x*y
if axis=0 is x
and axis=1 is y
.
参数: | c:array_like
m:int,可选
scl:标量,可选
axis:int,可选
|
---|---|
返回: | der:ndarray
|
也可以看看
例子
>>> from numpy.polynomial import polynomial as P
>>> c = (1,2,3,4) # 1 + 2x + 3x**2 + 4x**3
>>> P.polyder(c) # (d/dx)(c) = 2 + 6x + 12x**2
array([ 2., 6., 12.])
>>> P.polyder(c,3) # (d**3/dx**3)(c) = 24
array([ 24.])
>>> P.polyder(c,scl=-1) # (d/d(-x))(c) = -2 - 6x - 12x**2
array([ -2., -6., -12.])
>>> P.polyder(c,2,-1) # (d**2/d(-x)**2)(c) = 6 + 24x
array([ 6., 24.])