bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / polynomial / _polybase / ABCPolyBase / trim
function
numpy.polynomial._polybase:ABCPolyBase.trim
source: build-install/usr/lib/python3.14/site-packages/numpy/polynomial/_polybase.py :727
Signature
def trim ( self , tol = 0 ) Summary
Remove trailing coefficients
Extended Summary
Remove trailing coefficients until a coefficient is reached whose absolute value greater than tol or the beginning of the series is reached. If all the coefficients would be removed the series is set to [0]. A new series instance is returned with the new coefficients. The current instance remains unchanged.
Parameters
tol: non-negative number.All trailing coefficients less than
tolwill be removed.
Returns
new_series: seriesNew instance of series with trimmed coefficients.
Aliases
-
numpy.polynomial._polybase.ABCPolyBase.trim