From 0a17ccb5dad99e6dd33ab315223f1b0a6ffe98ae Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sat, 10 Dec 2011 08:35:29 -0700 Subject: STY: Whitespace cleanup and double space between function definitions. --- numpy/polynomial/chebyshev.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'numpy/polynomial/chebyshev.py') diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py index a6482fc72..b4f50d90e 100644 --- a/numpy/polynomial/chebyshev.py +++ b/numpy/polynomial/chebyshev.py @@ -121,6 +121,7 @@ def _cseries_to_zseries(cs) : zs[n-1:] = cs/2 return zs + zs[::-1] + def _zseries_to_cseries(zs) : """Covert z-series to a Chebyshev series. @@ -145,6 +146,7 @@ def _zseries_to_cseries(zs) : cs[1:n] *= 2 return cs + def _zseries_mul(z1, z2) : """Multiply two z-series. @@ -171,6 +173,7 @@ def _zseries_mul(z1, z2) : """ return np.convolve(z1, z2) + def _zseries_div(z1, z2) : """Divide the first z-series by the second. @@ -237,6 +240,7 @@ def _zseries_div(z1, z2) : rem = z1[i+1:i-1+len2].copy() return quo, rem + def _zseries_der(zs) : """Differentiate a z-series. @@ -268,6 +272,7 @@ def _zseries_der(zs) : d, r = _zseries_div(zs, ns) return d + def _zseries_int(zs) : """Integrate a z-series. @@ -434,6 +439,7 @@ chebone = np.array([1]) # Chebyshev coefficients representing the identity x. chebx = np.array([0,1]) + def chebline(off, scl) : """ Chebyshev series whose graph is a straight line. @@ -469,6 +475,7 @@ def chebline(off, scl) : else : return np.array([off]) + def chebfromroots(roots) : """ Generate a Chebyshev series with the given roots. @@ -787,6 +794,7 @@ def chebdiv(c1, c2): rem = pu.trimseq(_zseries_to_cseries(rem)) return quo, rem + def chebpow(cs, pow, maxpower=16) : """Raise a Chebyshev series to a power. @@ -838,6 +846,7 @@ def chebpow(cs, pow, maxpower=16) : prd = np.convolve(prd, zs) return _zseries_to_cseries(prd) + def chebder(cs, m=1, scl=1) : """ Differentiate a Chebyshev series. @@ -1015,6 +1024,7 @@ def chebint(cs, m=1, k=[], lbnd=0, scl=1): cs[0] += k[i] - chebval(lbnd, cs) return cs + def chebval(x, cs): """Evaluate a Chebyshev series. @@ -1075,6 +1085,7 @@ def chebval(x, cs): c1 = tmp + c1*x2 return c0 + c1*x + def chebvander(x, deg) : """Vandermonde matrix of given degree. -- cgit v1.2.1