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

Function lagdiv

numpy/polynomial/laguerre.py:508–551  ·  view source on GitHub ↗

Divide one Laguerre series by another. Returns the quotient-with-remainder of two Laguerre series `c1` / `c2`. The arguments are sequences of coefficients from lowest order "term" to highest, e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``. Parameters ----

(c1, c2)

Source from the content-addressed store, hash-verified

506
507
508def lagdiv(c1, c2):
509 """
510 Divide one Laguerre series by another.
511
512 Returns the quotient-with-remainder of two Laguerre series
513 `c1` / `c2`. The arguments are sequences of coefficients from lowest
514 order "term" to highest, e.g., [1,2,3] represents the series
515 ``P_0 + 2*P_1 + 3*P_2``.
516
517 Parameters
518 ----------
519 c1, c2 : array_like
520 1-D arrays of Laguerre series coefficients ordered from low to
521 high.
522
523 Returns
524 -------
525 [quo, rem] : ndarrays
526 Of Laguerre series coefficients representing the quotient and
527 remainder.
528
529 See Also
530 --------
531 lagadd, lagsub, lagmulx, lagmul, lagpow
532
533 Notes
534 -----
535 In general, the (polynomial) division of one Laguerre series by another
536 results in quotient and remainder terms that are not in the Laguerre
537 polynomial basis set. Thus, to express these results as a Laguerre
538 series, it is necessary to "reproject" the results onto the Laguerre
539 basis set, which may produce "unintuitive" (but correct) results; see
540 Examples section below.
541
542 Examples
543 --------
544 >>> from numpy.polynomial.laguerre import lagdiv
545 >>> lagdiv([ 8., -13., 38., -51., 36.], [0, 1, 2])
546 (array([1., 2., 3.]), array([0.]))
547 >>> lagdiv([ 9., -12., 38., -51., 36.], [0, 1, 2])
548 (array([1., 2., 3.]), array([1., 1.]))
549
550 """
551 return pu._div(lagmul, c1, c2)
552
553
554def lagpow(c, pow, maxpower=16):

Callers

nothing calls this directly

Calls 1

_divMethod · 0.80

Tested by

no test coverage detected