MCPcopy Create free account
hub / github.com/numpy/numpy / legpow

Function legpow

numpy/polynomial/legendre.py:581–609  ·  view source on GitHub ↗

Raise a Legendre series to a power. Returns the Legendre series `c` raised to the power `pow`. The argument `c` is a sequence of coefficients ordered from low to high. i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.`` Parameters ---------- c : array_like 1-D arr

(c, pow, maxpower=16)

Source from the content-addressed store, hash-verified

579
580
581def legpow(c, pow, maxpower=16):
582 """Raise a Legendre series to a power.
583
584 Returns the Legendre series `c` raised to the power `pow`. The
585 argument `c` is a sequence of coefficients ordered from low to high.
586 i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.``
587
588 Parameters
589 ----------
590 c : array_like
591 1-D array of Legendre series coefficients ordered from low to
592 high.
593 pow : integer
594 Power to which the series will be raised
595 maxpower : integer, optional
596 Maximum power allowed. This is mainly to limit growth of the series
597 to unmanageable size. Default is 16
598
599 Returns
600 -------
601 coef : ndarray
602 Legendre series of power.
603
604 See Also
605 --------
606 legadd, legsub, legmulx, legmul, legdiv
607
608 """
609 return pu._pow(legmul, c, pow, maxpower)
610
611
612def legder(c, m=1, scl=1, axis=0):

Callers

nothing calls this directly

Calls 1

_powMethod · 0.80

Tested by

no test coverage detected