diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2012-01-03 08:05:45 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-01-09 11:09:37 -0700 |
commit | a4e99a7998a30d8e777510aaa5926b436a844f2b (patch) | |
tree | 4539998dd7846b8e1ce27800f79be0f32a48d666 /numpy/polynomial/hermite.py | |
parent | 88163cb1ffb3a98a4ecc74481312a618813a9f1e (diff) | |
download | numpy-a4e99a7998a30d8e777510aaa5926b436a844f2b.tar.gz |
SPELL: Spellcheck the modules. Clarify an example.
Diffstat (limited to 'numpy/polynomial/hermite.py')
-rw-r--r-- | numpy/polynomial/hermite.py | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py index c0f8688b0..cd9b212f3 100644 --- a/numpy/polynomial/hermite.py +++ b/numpy/polynomial/hermite.py @@ -90,12 +90,12 @@ def poly2herm(pol) : Parameters ---------- pol : array_like - 1-d array containing the polynomial coefficients + 1-D array containing the polynomial coefficients Returns ------- c : ndarray - 1-d array containing the coefficients of the equivalent Hermite + 1-D array containing the coefficients of the equivalent Hermite series. See Also @@ -134,13 +134,13 @@ def herm2poly(c) : Parameters ---------- c : array_like - 1-d array containing the Hermite series coefficients, ordered + 1-D array containing the Hermite series coefficients, ordered from lowest order term to highest. Returns ------- pol : ndarray - 1-d array containing the coefficients of the equivalent polynomial + 1-D array containing the coefficients of the equivalent polynomial (relative to the "standard" basis) ordered from lowest order term to highest. @@ -304,7 +304,7 @@ def hermadd(c1, c2): Parameters ---------- c1, c2 : array_like - 1-d arrays of Hermite series coefficients ordered from low to + 1-D arrays of Hermite series coefficients ordered from low to high. Returns @@ -352,7 +352,7 @@ def hermsub(c1, c2): Parameters ---------- c1, c2 : array_like - 1-d arrays of Hermite series coefficients ordered from low to + 1-D arrays of Hermite series coefficients ordered from low to high. Returns @@ -400,7 +400,7 @@ def hermmulx(c): Parameters ---------- c : array_like - 1-d array of Hermite series coefficients ordered from low to + 1-D array of Hermite series coefficients ordered from low to high. Returns @@ -450,7 +450,7 @@ def hermmul(c1, c2): Parameters ---------- c1, c2 : array_like - 1-d arrays of Hermite series coefficients ordered from low to + 1-D arrays of Hermite series coefficients ordered from low to high. Returns @@ -466,8 +466,8 @@ def hermmul(c1, c2): ----- In general, the (polynomial) product of two C-series results in terms that are not in the Hermite polynomial basis set. Thus, to express - the product as a Hermite series, it is necessary to "re-project" the - product onto said basis set, which may produce "un-intuitive" (but + the product as a Hermite series, it is necessary to "reproject" the + product onto said basis set, which may produce "unintuitive" (but correct) results; see Examples section below. Examples @@ -517,7 +517,7 @@ def hermdiv(c1, c2): Parameters ---------- c1, c2 : array_like - 1-d arrays of Hermite series coefficients ordered from low to + 1-D arrays of Hermite series coefficients ordered from low to high. Returns @@ -535,8 +535,8 @@ def hermdiv(c1, c2): In general, the (polynomial) division of one Hermite series by another results in quotient and remainder terms that are not in the Hermite polynomial basis set. Thus, to express these results as a Hermite - series, it is necessary to "re-project" the results onto the Hermite - basis set, which may produce "un-intuitive" (but correct) results; see + series, it is necessary to "reproject" the results onto the Hermite + basis set, which may produce "unintuitive" (but correct) results; see Examples section below. Examples @@ -576,19 +576,19 @@ def hermpow(c, pow, maxpower=16) : """Raise a Hermite series to a power. Returns the Hermite series `c` raised to the power `pow`. The - arguement `c` is a sequence of coefficients ordered from low to high. + argument `c` is a sequence of coefficients ordered from low to high. i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.`` Parameters ---------- c : array_like - 1d array of Hermite series coefficients ordered from low to + 1-D array of Hermite series coefficients ordered from low to high. pow : integer Power to which the series will be raised maxpower : integer, optional Maximum power allowed. This is mainly to limit growth of the series - to umanageable size. Default is 16 + to unmanageable size. Default is 16 Returns ------- @@ -669,7 +669,7 @@ def hermder(c, m=1, scl=1, axis=0) : ----- In general, the result of differentiating a Hermite series does not resemble the same operation on a power series. Thus the result of this - function may be "un-intuitive," albeit correct; see Examples section + function may be "unintuitive," albeit correct; see Examples section below. Examples @@ -727,7 +727,7 @@ def hermint(c, m=1, k=[], lbnd=0, scl=1, axis=0): beware": note that, depending on what one is doing, one may want `scl` to be the reciprocal of what one might expect; for more information, see the Notes section below.) The argument `c` is an array of - coefficients from low to high degree along each axix, e.g., [1,2,3] + coefficients from low to high degree along each axis, e.g., [1,2,3] represents the series ``H_0 + 2*H_1 + 3*H_2`` while [[1,2],[1,2]] represents ``1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) + 2*H_0(x)*H_1(y) + 2*H_1(x)*H_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``. @@ -780,8 +780,8 @@ def hermint(c, m=1, k=[], lbnd=0, scl=1, axis=0): :math:`1/a` - perhaps not what one would have first thought. Also note that, in general, the result of integrating a C-series needs - to be "re-projected" onto the C-series basis set. Thus, typically, - the result of this function is "un-intuitive," albeit correct; see + to be "reprojected" onto the C-series basis set. Thus, typically, + the result of this function is "unintuitive," albeit correct; see Examples section below. Examples @@ -872,7 +872,7 @@ def hermval(x, c, tensor=True): with themselves and with the elements of `c`. c : array_like Array of coefficients ordered so that the coefficients for terms of - degree n are contained in c[n]. If `c` is multidimesional the + degree n are contained in c[n]. If `c` is multidimensional the remaining indices enumerate multiple polynomials. In the two dimensional case the coefficients may be thought of as stored in the columns of `c`. @@ -995,7 +995,7 @@ def hermval2d(x, y, c): def hermgrid2d(x, y, c): """ - Evaluate a 2-D Hermite series on the Cartesion product of x and y. + Evaluate a 2-D Hermite series on the Cartesian product of x and y. This function returns the values: @@ -1030,7 +1030,7 @@ def hermgrid2d(x, y, c): Returns ------- values : ndarray, compatible object - The values of the two dimensional polynomial at points in the Cartesion + The values of the two dimensional polynomial at points in the Cartesian product of `x` and `y`. See Also @@ -1083,7 +1083,7 @@ def hermval3d(x, y, z, c): Returns ------- values : ndarray, compatible object - The values of the multidimension polynomial on points formed with + The values of the multidimensional polynomial on points formed with triples of corresponding values from `x`, `y`, and `z`. See Also @@ -1128,7 +1128,7 @@ def hermgrid3d(x, y, z, c): If `c` has fewer than three dimensions, ones are implicitly appended to its shape to make it 3-D. The shape of the result will be c.shape[3:] + - x.shape + yshape + z.shape. + x.shape + y.shape + z.shape. Parameters ---------- @@ -1147,7 +1147,7 @@ def hermgrid3d(x, y, z, c): Returns ------- values : ndarray, compatible object - The values of the two dimensional polynomial at points in the Cartesion + The values of the two dimensional polynomial at points in the Cartesian product of `x` and `y`. See Also @@ -1445,14 +1445,14 @@ def hermfit(x, y, deg, rcond=None, full=False, w=None): If some of the singular values of `V` are so small that they are neglected, then a `RankWarning` will be issued. This means that the - coeficient values may be poorly determined. Using a lower order fit + coefficient values may be poorly determined. Using a lower order fit will usually get rid of the warning. The `rcond` parameter can also be set to a value smaller than its default, but the resulting fit may be spurious and have large contributions from roundoff error. Fits using Hermite series are probably most useful when the data can be approximated by ``sqrt(w(x)) * p(x)``, where `w(x)` is the Hermite - weight. In that case the wieght ``sqrt(w(x[i])`` should be used + weight. In that case the weight ``sqrt(w(x[i])`` should be used together with data values ``y[i]/sqrt(w(x[i])``. The weight function is available as `hermweight`. @@ -1543,7 +1543,7 @@ def hermcompanion(c): Parameters ---------- c : array_like - 1-d array of Hermite series coefficients ordered from low to high + 1-D array of Hermite series coefficients ordered from low to high degree. Returns |