Subtract one Hermite series from another. Returns the difference of two Hermite series `c1` - `c2`. The sequences of coefficients are from lowest order term to highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``. Parameters ---------- c1, c2 : array_l
(c1, c2)
| 351 | |
| 352 | |
| 353 | def hermsub(c1, c2): |
| 354 | """ |
| 355 | Subtract one Hermite series from another. |
| 356 | |
| 357 | Returns the difference of two Hermite series `c1` - `c2`. The |
| 358 | sequences of coefficients are from lowest order term to highest, i.e., |
| 359 | [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``. |
| 360 | |
| 361 | Parameters |
| 362 | ---------- |
| 363 | c1, c2 : array_like |
| 364 | 1-D arrays of Hermite series coefficients ordered from low to |
| 365 | high. |
| 366 | |
| 367 | Returns |
| 368 | ------- |
| 369 | out : ndarray |
| 370 | Of Hermite series coefficients representing their difference. |
| 371 | |
| 372 | See Also |
| 373 | -------- |
| 374 | hermadd, hermmulx, hermmul, hermdiv, hermpow |
| 375 | |
| 376 | Notes |
| 377 | ----- |
| 378 | Unlike multiplication, division, etc., the difference of two Hermite |
| 379 | series is a Hermite series (without having to "reproject" the result |
| 380 | onto the basis set) so subtraction, just like that of "standard" |
| 381 | polynomials, is simply "component-wise." |
| 382 | |
| 383 | Examples |
| 384 | -------- |
| 385 | >>> from numpy.polynomial.hermite import hermsub |
| 386 | >>> hermsub([1, 2, 3, 4], [1, 2, 3]) |
| 387 | array([0., 0., 0., 4.]) |
| 388 | |
| 389 | """ |
| 390 | return pu._sub(c1, c2) |
| 391 | |
| 392 | |
| 393 | def hermmulx(c): |