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

Function hermadd

numpy/polynomial/hermite.py:313–350  ·  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

311
312
313def 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
353def hermsub(c1, c2):

Callers 2

poly2hermFunction · 0.85
hermmulFunction · 0.85

Calls 1

_addMethod · 0.80

Tested by

no test coverage detected