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

Function lagadd

numpy/polynomial/laguerre.py:307–345  ·  view source on GitHub ↗

Add one Laguerre series to another. Returns the sum of two Laguerre 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 : a

(c1, c2)

Source from the content-addressed store, hash-verified

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

Callers 2

poly2lagFunction · 0.85
lagmulFunction · 0.85

Calls 1

_addMethod · 0.80

Tested by

no test coverage detected