Previous topic

numpy.polynomial.legendre.Legendre.trim

Next topic

numpy.polynomial.legendre.legval

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

numpy.polynomial.legendre.Legendre.truncate

Legendre.truncate(size)[source]

Truncate series to length size.

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.