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

Function hermediv

numpy/polynomial/hermite_e.py:507–550  ·  view source on GitHub ↗

Divide one Hermite series by another. Returns the quotient-with-remainder of two Hermite 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

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

Callers

nothing calls this directly

Calls 1

_divMethod · 0.80

Tested by

no test coverage detected