summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2010-09-15 09:24:31 -0600
committerCharles Harris <charlesr.harris@gmail.com>2011-03-03 20:20:13 -0700
commit8a5ed09610e56f9f60089ca017b7e4abd3ce9264 (patch)
tree896eb18ac89c82afa6d9675d7ea37ff36c0bae7b
parent578cbb489bfad48b1611c4cfd5d89fc6ac9a7ce8 (diff)
downloadnumpy-8a5ed09610e56f9f60089ca017b7e4abd3ce9264.tar.gz
Remove unused function legtimesx, it has been replaced by legmulx.
-rw-r--r--numpy/polynomial/legendre.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py
index 9aec256cd..3ea68a5e6 100644
--- a/numpy/polynomial/legendre.py
+++ b/numpy/polynomial/legendre.py
@@ -227,52 +227,6 @@ def legline(off, scl) :
return np.array([off])
-def legtimesx(cs):
- """Multiply a Legendre series by x.
-
- Multiply the Legendre series `cs` by x, where x is the independent
- variable.
-
-
- Parameters
- ----------
- cs : array_like
- 1-d array of Legendre series coefficients ordered from low to
- high.
-
- Returns
- -------
- out : ndarray
- Array representing the result of the multiplication.
-
- Notes
- -----
- The multiplication uses the recursion relationship for Legendre
- polynomials in the form
-
- .. math::
-
- xP_i(x) = ((i + 1)*P_{i + 1}(x) + i*P_{i - 1}(x))/(2i + 1)
-
- """
- # cs is a trimmed copy
- [cs] = pu.as_series([cs])
- # The zero series needs special treatment
- if len(cs) == 1 and cs[0] == 0:
- return cs
-
- prd = np.empty(len(cs) + 1, dtype=cs.dtype)
- prd[0] = cs[0]*0
- prd[1] = cs[0]
- for i in range(1, len(cs)):
- j = i + 1
- k = i - 1
- s = i + j
- prd[j] = (cs[i]*j)/s
- prd[k] += (cs[i]*i)/s
- return prd
-
-
def legfromroots(roots) :
"""
Generate a Legendre series with the given roots.