Add one Hermite series to another. Returns the sum of two Hermite series `c1` + `c2`. The arguments are sequences of coefficients ordered 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 : arr
(c1, c2)
| 311 | |
| 312 | |
| 313 | def hermadd(c1, c2): |
| 314 | """ |
| 315 | Add one Hermite series to another. |
| 316 | |
| 317 | Returns the sum of two Hermite series `c1` + `c2`. The arguments |
| 318 | are sequences of coefficients ordered from lowest order term to |
| 319 | highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``. |
| 320 | |
| 321 | Parameters |
| 322 | ---------- |
| 323 | c1, c2 : array_like |
| 324 | 1-D arrays of Hermite series coefficients ordered from low to |
| 325 | high. |
| 326 | |
| 327 | Returns |
| 328 | ------- |
| 329 | out : ndarray |
| 330 | Array representing the Hermite series of their sum. |
| 331 | |
| 332 | See Also |
| 333 | -------- |
| 334 | hermsub, hermmulx, hermmul, hermdiv, hermpow |
| 335 | |
| 336 | Notes |
| 337 | ----- |
| 338 | Unlike multiplication, division, etc., the sum of two Hermite series |
| 339 | is a Hermite series (without having to "reproject" the result onto |
| 340 | the basis set) so addition, just like that of "standard" polynomials, |
| 341 | is simply "component-wise." |
| 342 | |
| 343 | Examples |
| 344 | -------- |
| 345 | >>> from numpy.polynomial.hermite import hermadd |
| 346 | >>> hermadd([1, 2, 3], [1, 2, 3, 4]) |
| 347 | array([2., 4., 6., 4.]) |
| 348 | |
| 349 | """ |
| 350 | return pu._add(c1, c2) |
| 351 | |
| 352 | |
| 353 | def hermsub(c1, c2): |