numpy.polynomial.legendre.Legendre.fromroots#

method

classmethod polynomial.legendre.Legendre.fromroots(roots, domain=[], window=None, symbol='x')[源代码]#

返回具有指定根的序列实例.

返回一个表示乘积 (x - r[0])(x - r[1])...(x - r[n-1]) 的级数,其中 r 是根的列表.

参数:
rootsarray_like

根的列表.

domain{[], None, array_like}, optional

结果级数的域.如果为None,则域是从最小根到最大根的区间.如果为[],则域是类域.默认为[].

window{None, 类数组}, 可选

返回的级数的窗口.如果为None,则使用类窗口.默认为None.

symbolstr, optional

表示自变量的符号.默认为 ‘x’.

返回:
new_seriesseries

具有指定根的级数.