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

Function _sub

numpy/polynomial/polyutils.py:585–596  ·  view source on GitHub ↗

Helper function used to implement the `` sub`` functions.

(c1, c2)

Source from the content-addressed store, hash-verified

583
584
585def _sub(c1, c2):
586 """ Helper function used to implement the ``<type>sub`` functions. """
587 # c1, c2 are trimmed copies
588 [c1, c2] = as_series([c1, c2])
589 if len(c1) > len(c2):
590 c1[:c2.size] -= c2
591 ret = c1
592 else:
593 c2 = -c2
594 c2[:c1.size] += c1
595 ret = c2
596 return trimseq(ret)
597
598
599def _fit(vander_f, x, y, deg, rcond=None, full=False, w=None):

Callers

nothing calls this directly

Calls 2

as_seriesFunction · 0.85
trimseqFunction · 0.85

Tested by

no test coverage detected