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

Method integ

numpy/polynomial/_polybase.py:853–884  ·  view source on GitHub ↗

Integrate. Return a series instance that is the definite integral of the current series. Parameters ---------- m : non-negative int The number of integrations to perform. k : array_like Integration constants. The first constan

(self, m=1, k=[], lbnd=None)

Source from the content-addressed store, hash-verified

851 return pu.mapparms(self.domain, self.window)
852
853 def integ(self, m=1, k=[], lbnd=None):
854 """Integrate.
855
856 Return a series instance that is the definite integral of the
857 current series.
858
859 Parameters
860 ----------
861 m : non-negative int
862 The number of integrations to perform.
863 k : array_like
864 Integration constants. The first constant is applied to the
865 first integration, the second to the second, and so on. The
866 list of values must less than or equal to `m` in length and any
867 missing values are set to zero.
868 lbnd : Scalar
869 The lower bound of the definite integral.
870
871 Returns
872 -------
873 new_series : series
874 A new series representing the integral. The domain is the same
875 as the domain of the integrated series.
876
877 """
878 off, scl = self.mapparms()
879 if lbnd is None:
880 lbnd = 0
881 else:
882 lbnd = off + scl*lbnd
883 coef = self._int(self.coef, m, k, lbnd, 1./scl)
884 return self.__class__(coef, self.domain, self.window, self.symbol)
885
886 def deriv(self, m=1):
887 """Differentiate.

Callers 3

test_integFunction · 0.45
test_derivFunction · 0.45
test_integMethod · 0.45

Calls 2

mapparmsMethod · 0.95
_intMethod · 0.95

Tested by 3

test_integFunction · 0.36
test_derivFunction · 0.36
test_integMethod · 0.36