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

Function lagsub

numpy/polynomial/laguerre.py:348–385  ·  view source on GitHub ↗

Subtract one Laguerre series from another. Returns the difference of two Laguerre 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

(c1, c2)

Source from the content-addressed store, hash-verified

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

Callers 1

lagmulFunction · 0.85

Calls 1

_subMethod · 0.80

Tested by

no test coverage detected