numpy.polynomial.legendre.legline — NumPy v2.2 Manual (original) (raw)

polynomial.legendre.legline(off, scl)[source]#

Legendre series whose graph is a straight line.

Parameters:

off, sclscalars

The specified line is given by off + scl*x.

Returns:

yndarray

This module’s representation of the Legendre series foroff + scl*x.

Examples

import numpy.polynomial.legendre as L L.legline(3,2) array([3, 2]) L.legval(-3, L.legline(3,2)) # should be -3 -3.0