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

Function hermesub

numpy/polynomial/hermite_e.py:352–389  ·  view source on GitHub ↗

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

(c1, c2)

Source from the content-addressed store, hash-verified

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

Callers 1

hermemulFunction · 0.85

Calls 1

_subMethod · 0.80

Tested by

no test coverage detected