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 / truncate

function

numpy.polynomial._polybase:ABCPolyBase.truncate

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

Signature

def   truncate ( self size )

Summary

Truncate series to length size.

Extended Summary

Reduce the series to length size by discarding the high degree terms. The value of size must be a positive integer. This can be useful in least squares where the coefficients of the high degree terms may be very small.

Parameters

size : positive int

The series is reduced to length size by discarding the high degree terms. The value of size must be a positive integer.

Returns

new_series : series

New instance of series with truncated coefficients.

Aliases

  • numpy.polynomial._polybase.ABCPolyBase.truncate