This is a pre-release version (latest).Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / numpy / polynomial / legendre / legline

function

numpy.polynomial.legendre:legline

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

Signature

def legline(off, scl)

Summary

Legendre series whose graph is a straight line.

Parameters

off, scl : scalars

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

Returns

y : ndarray

This module's representation of the Legendre series for off + 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
✗
np.float64(-3.0)

See also

numpy.polynomial.chebyshev.chebline
numpy.polynomial.hermite.hermline
numpy.polynomial.hermite_e.hermeline
numpy.polynomial.laguerre.lagline
numpy.polynomial.polynomial.polyline

Aliases

  • numpy.polynomial.Legendre._line
  • numpy.polynomial.legendre.legline