This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / polynomial / _polybase / ABCPolyBase / fromroots

classmethod

numpy.polynomial._polybase:ABCPolyBase.fromroots

source: build-install/usr/lib/python3.14/site-packages/numpy/polynomial/_polybase.py :1036

Summary

Return series instance that has the specified roots.

Extended Summary

Returns a series representing the product (x - r[0])*(x - r[1])*...*(x - r[n-1]), where r is a list of roots.

Parameters

roots : array_like

List of roots.

domain : {[], None, array_like}, optional

Domain for the resulting series. If None the domain is the interval from the smallest root to the largest. If [] the domain is the class domain. The default is [].

window : {None, array_like}, optional

Window for the returned series. If None the class window is used. The default is None.

symbol : str, optional

Symbol representing the independent variable. Default is 'x'.

Returns

new_series : series

Series with the specified roots.

Aliases

  • numpy.polynomial._polybase.ABCPolyBase.fromroots