NumPy

Previous topic

numpy.polynomial.polyutils.as_series

Next topic

numpy.polynomial.polyutils.trimcoef

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

numpy.polynomial.polyutils.trimseq

numpy.polynomial.polyutils.trimseq(seq)[source]

Remove small Poly series coefficients.

Parameters
seqsequence

Sequence of Poly series coefficients. This routine fails for empty sequences.

Returns
seriessequence

Subsequence with trailing zeros removed. If the resulting sequence would be empty, return the first element. The returned sequence may or may not be a view.

Notes

Do not lose the type info if the sequence contains unknown objects.