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

Function hermeadd

numpy/polynomial/hermite_e.py:312–349  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 2

poly2hermeFunction · 0.85
hermemulFunction · 0.85

Calls 1

_addMethod · 0.80

Tested by

no test coverage detected