Back to Numerical Arrays (NumPy)

np.poly

Find the coefficients of a polynomial with the given sequence of roots.

Syntax

np.poly(seq_of_zeros)

Description

Find the coefficients of a polynomial with the given sequence of roots. This is a NumPy legacy function. Returns coefficients in descending powers order (highest power first), which is the opposite of the numpy.polynomial module convention. NOTE: This is the legacy numpy.poly function. For the modern API, use polyfromroots() from the polynomial module which uses ascending powers order.

Parameters

NameDescription
seq_of_zeros- A sequence of polynomial roots

Returns

number[]