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)
| 510 | |
| 511 | |
| 512 | def hermdiv(c1, c2): |
| 513 | """ |
| 514 | Divide one Hermite series by another. |
| 515 | |
| 516 | Returns the quotient-with-remainder of two Hermite series |
| 517 | `c1` / `c2`. The arguments are sequences of coefficients from lowest |
| 518 | order "term" to highest, e.g., [1,2,3] represents the series |
| 519 | ``P_0 + 2*P_1 + 3*P_2``. |
| 520 | |
| 521 | Parameters |
| 522 | ---------- |
| 523 | c1, c2 : array_like |
| 524 | 1-D arrays of Hermite series coefficients ordered from low to |
| 525 | high. |
| 526 | |
| 527 | Returns |
| 528 | ------- |
| 529 | [quo, rem] : ndarrays |
| 530 | Of Hermite series coefficients representing the quotient and |
| 531 | remainder. |
| 532 | |
| 533 | See Also |
| 534 | -------- |
| 535 | hermadd, hermsub, hermmulx, hermmul, hermpow |
| 536 | |
| 537 | Notes |
| 538 | ----- |
| 539 | In general, the (polynomial) division of one Hermite series by another |
| 540 | results in quotient and remainder terms that are not in the Hermite |
| 541 | polynomial basis set. Thus, to express these results as a Hermite |
| 542 | series, it is necessary to "reproject" the results onto the Hermite |
| 543 | basis set, which may produce "unintuitive" (but correct) results; see |
| 544 | Examples section below. |
| 545 | |
| 546 | Examples |
| 547 | -------- |
| 548 | >>> from numpy.polynomial.hermite import hermdiv |
| 549 | >>> hermdiv([ 52., 29., 52., 7., 6.], [0, 1, 2]) |
| 550 | (array([1., 2., 3.]), array([0.])) |
| 551 | >>> hermdiv([ 54., 31., 52., 7., 6.], [0, 1, 2]) |
| 552 | (array([1., 2., 3.]), array([2., 2.])) |
| 553 | >>> hermdiv([ 53., 30., 52., 7., 6.], [0, 1, 2]) |
| 554 | (array([1., 2., 3.]), array([1., 1.])) |
| 555 | |
| 556 | """ |
| 557 | return pu._div(hermmul, c1, c2) |
| 558 | |
| 559 | |
| 560 | def hermpow(c, pow, maxpower=16): |