# numpy/numpy

DOC: fix some formatting errors in polynomial docs.

1 parent 6439e35 commit 85813a9a2eb163582cb518f0fe5d632b662ad0c7 rgommers committed Mar 3, 2011
Showing with 35 additions and 40 deletions.
1. +4 −4 numpy/polynomial/chebyshev.py
2. +5 −10 numpy/polynomial/legendre.py
3. +26 −26 numpy/polynomial/polytemplate.py
8 numpy/polynomial/chebyshev.py
 @@ -1344,12 +1344,12 @@ def chebpts1(npts): Parameters ---------- - npts: int + npts : int Number of sample points desired. Returns ------- - pts: ndarray + pts : ndarray The Chebyshev points of the second kind. Notes @@ -1375,12 +1375,12 @@ def chebpts2(npts): Parameters ---------- - npts: int + npts : int Number of sample points desired. Returns ------- - pts: ndarray + pts : ndarray The Chebyshev points of the second kind. Notes
15 numpy/polynomial/legendre.py
 @@ -65,8 +65,6 @@ def poly2leg(pol) : """ - poly2leg(pol) - Convert a polynomial to a Legendre series. Convert an array representing the coefficients of a polynomial (relative @@ -463,7 +461,7 @@ def legmulx(cs): .. math:: - xP_i(x) = ((i + 1)*P_{i + 1}(x) + i*P_{i - 1}(x))/(2i + 1) + xP_i(x) = ((i + 1)*P_{i + 1}(x) + i*P_{i - 1}(x))/(2i + 1) """ # cs is a trimmed copy @@ -564,12 +562,12 @@ def legdiv(c1, c2): Parameters ---------- c1, c2 : array_like - 1-d arrays of Legendre series coefficients ordered from low to + 1-D arrays of Legendre series coefficients ordered from low to high. Returns ------- - [quo, rem] : ndarrays + quo, rem : ndarrays Of Legendre series coefficients representing the quotient and remainder. @@ -683,8 +681,8 @@ def legder(cs, m=1, scl=1) : Parameters ---------- - cs: array_like - 1-d array of Legendre series coefficients ordered from low to high. + cs : array_like + 1-D array of Legendre series coefficients ordered from low to high. m : int, optional Number of derivatives taken, must be non-negative. (Default: 1) scl : scalar, optional @@ -887,9 +885,6 @@ def legval(x, cs): -------- legfit - Examples - -------- - Notes ----- The evaluation uses Clenshaw recursion, aka synthetic division.
52 numpy/polynomial/polytemplate.py
 @@ -345,12 +345,12 @@ def convert(self, domain=None, kind=None) : Parameters ---------- - domain : {None, array_like} - The domain of the new series type instance. If the value is is - ``None``, then the default domain of `kind` is used. - kind : {None, class} + domain : array_like, optional + The domain of the new series type instance. If the value is None, + then the default domain of `kind` is used. + kind : class, optional The polynomial series type class to which the current instance - should be converted. If kind is ``None``, then the class of the + should be converted. If kind is None, then the class of the current instance is used. Returns @@ -359,14 +359,14 @@ def convert(self, domain=None, kind=None) : The returned class can be of different type than the current instance and/or have a different domain. - Examples - -------- - Notes ----- Conversion between domains and class types can result in numerically ill defined series. + Examples + -------- + """ if kind is None : kind = \$name @@ -390,11 +390,11 @@ def mapparms(self) : off, scl : floats or complex The mapping function is defined by ``off + scl*x``. - Notes: - ------ + Notes + ----- If the current domain is the interval ``[l_1, r_1]`` and the default interval is ``[l_2, r_2]``, then the linear mapping function ``L`` is - defined by the equations: + defined by the equations:: L(l_1) = l_2 L(r_1) = r_2 @@ -491,8 +491,8 @@ def integ(self, m=1, k=[], lbnd=None) : See Also -------- - `\${nick}int` : similar function. - `\${nick}der` : similar function for derivative. + \${nick}int : similar function. + \${nick}der : similar function for derivative. """ off, scl = self.mapparms() @@ -521,8 +521,8 @@ def deriv(self, m=1): See Also -------- - `\${nick}der` : similar function. - `\${nick}int` : similar function for integration. + \${nick}der : similar function. + \${nick}int : similar function for integration. """ off, scl = self.mapparms() @@ -538,8 +538,8 @@ def roots(self) : See Also -------- - `\${nick}roots` : similar function - `\${nick}fromroots` : function to go generate series from roots. + \${nick}roots : similar function + \${nick}fromroots : function to go generate series from roots. """ roots = \${nick}roots(self.coef) @@ -552,8 +552,8 @@ def linspace(self, n=100): Here y is the value of the polynomial at the points x. This is intended as a plotting aid. - Paramters - --------- + Parameters + ---------- n : int, optional Number of point pairs to return. The default value is 100. @@ -577,9 +577,9 @@ def fit(x, y, deg, domain=None, rcond=None, full=False, w=None) : """Least squares fit to data. Return a `\$name` instance that is the least squares fit to the data - `y` sampled at `x`. Unlike \${nick}fit, the domain of the returned + `y` sampled at `x`. Unlike `\${nick}fit`, the domain of the returned instance can be specified and this will often result in a superior - fit with less chance of ill conditioning. See \${nick}fit for full + fit with less chance of ill conditioning. See `\${nick}fit` for full documentation of the implementation. Parameters @@ -591,7 +591,7 @@ def fit(x, y, deg, domain=None, rcond=None, full=False, w=None) : points sharing the same x-coordinates can be fitted at once by passing in a 2D-array that contains one dataset per column. deg : int - Degree of the fitting polynomial + Degree of the fitting polynomial. domain : {None, [beg, end], []}, optional Domain to use for the returned \$name instance. If ``None``, then a minimal domain that covers the points `x` is chosen. If @@ -671,14 +671,14 @@ def identity(domain=\$domain) : If ``p`` is the returned \$name object, then ``p(x) == x`` for all values of x. - Parameters: - ----------- + Parameters + ---------- domain : array_like The resulting array must be if the form ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of the domain. - Returns: - -------- + Returns + ------- identity : \$name object """