This is documentation for an old release of NumPy (version 1.13). Read this page in the documentation of the latest stable release (version 2.2).

numpy.polynomial.polynomial.Polynomial.degree

Polynomial.degree()[source]

The degree of the series.

New in version 1.5.0.

Returns:

degree : int

Degree of the series, one less than the number of coefficients.