diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-12-13 15:53:56 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-12-14 11:33:22 -0700 |
commit | ec0e04694278ef9ea83537d308b07fc27c1b5f85 (patch) | |
tree | a28bb53d6827e5449c3f2d5ade3a4ad43bef7ca0 /numpy/polynomial | |
parent | 2a1e5a6d2ffdabf2a18875ee8dd57773d608e4c5 (diff) | |
download | numpy-ec0e04694278ef9ea83537d308b07fc27c1b5f85.tar.gz |
DEP: Fix escaped string characters deprecated in Python 3.6.
In Python 3.6 a number of escape sequences that were previously accepted
-- for instance "\(" that was translated to "\\(" -- are deprecated. To
retain the previous behavior either raw strings must be used or the
backslash must be properly escaped itself.
Diffstat (limited to 'numpy/polynomial')
-rw-r--r-- | numpy/polynomial/chebyshev.py | 10 | ||||
-rw-r--r-- | numpy/polynomial/hermite.py | 10 | ||||
-rw-r--r-- | numpy/polynomial/hermite_e.py | 10 | ||||
-rw-r--r-- | numpy/polynomial/laguerre.py | 8 | ||||
-rw-r--r-- | numpy/polynomial/legendre.py | 2 | ||||
-rw-r--r-- | numpy/polynomial/polynomial.py | 2 |
6 files changed, 21 insertions, 21 deletions
diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py index 82b3dc9a6..5d28b990f 100644 --- a/numpy/polynomial/chebyshev.py +++ b/numpy/polynomial/chebyshev.py @@ -1244,7 +1244,7 @@ def chebgrid2d(x, y, c): This function returns the values: - .. math:: p(a,b) = \sum_{i,j} c_{i,j} * T_i(a) * T_j(b), + .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * T_i(a) * T_j(b), where the points `(a, b)` consist of all pairs formed by taking `a` from `x` and `b` from `y`. The resulting points form a grid with @@ -1898,7 +1898,7 @@ def chebgauss(deg): Computes the sample points and weights for Gauss-Chebyshev quadrature. These sample points and weights will correctly integrate polynomials of degree :math:`2*deg - 1` or less over the interval :math:`[-1, 1]` with - the weight function :math:`f(x) = 1/\sqrt{1 - x^2}`. + the weight function :math:`f(x) = 1/\\sqrt{1 - x^2}`. Parameters ---------- @@ -1921,9 +1921,9 @@ def chebgauss(deg): be problematic. For Gauss-Chebyshev there are closed form solutions for the sample points and weights. If n = `deg`, then - .. math:: x_i = \cos(\pi (2 i - 1) / (2 n)) + .. math:: x_i = \\cos(\\pi (2 i - 1) / (2 n)) - .. math:: w_i = \pi / n + .. math:: w_i = \\pi / n """ ideg = int(deg) @@ -1940,7 +1940,7 @@ def chebweight(x): """ The weight function of the Chebyshev polynomials. - The weight function is :math:`1/\sqrt{1 - x^2}` and the interval of + The weight function is :math:`1/\\sqrt{1 - x^2}` and the interval of integration is :math:`[-1, 1]`. The Chebyshev polynomials are orthogonal, but not normalized, with respect to this weight function. diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py index d7038e54d..00ca8702d 100644 --- a/numpy/polynomial/hermite.py +++ b/numpy/polynomial/hermite.py @@ -1007,7 +1007,7 @@ def hermgrid2d(x, y, c): This function returns the values: - .. math:: p(a,b) = \sum_{i,j} c_{i,j} * H_i(a) * H_j(b) + .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * H_i(a) * H_j(b) where the points `(a, b)` consist of all pairs formed by taking `a` from `x` and `b` from `y`. The resulting points form a grid with @@ -1719,8 +1719,8 @@ def hermgauss(deg): Computes the sample points and weights for Gauss-Hermite quadrature. These sample points and weights will correctly integrate polynomials of - degree :math:`2*deg - 1` or less over the interval :math:`[-\inf, \inf]` - with the weight function :math:`f(x) = \exp(-x^2)`. + degree :math:`2*deg - 1` or less over the interval :math:`[-\\inf, \\inf]` + with the weight function :math:`f(x) = \\exp(-x^2)`. Parameters ---------- @@ -1784,8 +1784,8 @@ def hermweight(x): """ Weight function of the Hermite polynomials. - The weight function is :math:`\exp(-x^2)` and the interval of - integration is :math:`[-\inf, \inf]`. the Hermite polynomials are + The weight function is :math:`\\exp(-x^2)` and the interval of + integration is :math:`[-\\inf, \\inf]`. the Hermite polynomials are orthogonal, but not normalized, with respect to this weight function. Parameters diff --git a/numpy/polynomial/hermite_e.py b/numpy/polynomial/hermite_e.py index 8a70acfa2..49888ee09 100644 --- a/numpy/polynomial/hermite_e.py +++ b/numpy/polynomial/hermite_e.py @@ -1005,7 +1005,7 @@ def hermegrid2d(x, y, c): This function returns the values: - .. math:: p(a,b) = \sum_{i,j} c_{i,j} * H_i(a) * H_j(b) + .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * H_i(a) * H_j(b) where the points `(a, b)` consist of all pairs formed by taking `a` from `x` and `b` from `y`. The resulting points form a grid with @@ -1717,8 +1717,8 @@ def hermegauss(deg): Computes the sample points and weights for Gauss-HermiteE quadrature. These sample points and weights will correctly integrate polynomials of - degree :math:`2*deg - 1` or less over the interval :math:`[-\inf, \inf]` - with the weight function :math:`f(x) = \exp(-x^2/2)`. + degree :math:`2*deg - 1` or less over the interval :math:`[-\\inf, \\inf]` + with the weight function :math:`f(x) = \\exp(-x^2/2)`. Parameters ---------- @@ -1781,8 +1781,8 @@ def hermegauss(deg): def hermeweight(x): """Weight function of the Hermite_e polynomials. - The weight function is :math:`\exp(-x^2/2)` and the interval of - integration is :math:`[-\inf, \inf]`. the HermiteE polynomials are + The weight function is :math:`\\exp(-x^2/2)` and the interval of + integration is :math:`[-\\inf, \\inf]`. the HermiteE polynomials are orthogonal, but not normalized, with respect to this weight function. Parameters diff --git a/numpy/polynomial/laguerre.py b/numpy/polynomial/laguerre.py index ffd032883..49b0a9247 100644 --- a/numpy/polynomial/laguerre.py +++ b/numpy/polynomial/laguerre.py @@ -1007,7 +1007,7 @@ def laggrid2d(x, y, c): This function returns the values: - .. math:: p(a,b) = \sum_{i,j} c_{i,j} * L_i(a) * L_j(b) + .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * L_i(a) * L_j(b) where the points `(a, b)` consist of all pairs formed by taking `a` from `x` and `b` from `y`. The resulting points form a grid with @@ -1674,8 +1674,8 @@ def laggauss(deg): Computes the sample points and weights for Gauss-Laguerre quadrature. These sample points and weights will correctly integrate polynomials of - degree :math:`2*deg - 1` or less over the interval :math:`[0, \inf]` - with the weight function :math:`f(x) = \exp(-x)`. + degree :math:`2*deg - 1` or less over the interval :math:`[0, \\inf]` + with the weight function :math:`f(x) = \\exp(-x)`. Parameters ---------- @@ -1736,7 +1736,7 @@ def lagweight(x): """Weight function of the Laguerre polynomials. The weight function is :math:`exp(-x)` and the interval of integration - is :math:`[0, \inf]`. The Laguerre polynomials are orthogonal, but not + is :math:`[0, \\inf]`. The Laguerre polynomials are orthogonal, but not normalized, with respect to this weight function. Parameters diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py index 488660545..b54fd2982 100644 --- a/numpy/polynomial/legendre.py +++ b/numpy/polynomial/legendre.py @@ -1045,7 +1045,7 @@ def leggrid2d(x, y, c): This function returns the values: - .. math:: p(a,b) = \sum_{i,j} c_{i,j} * L_i(a) * L_j(b) + .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * L_i(a) * L_j(b) where the points `(a, b)` consist of all pairs formed by taking `a` from `x` and `b` from `y`. The resulting points form a grid with diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py index 95f044a2d..eae2f8692 100644 --- a/numpy/polynomial/polynomial.py +++ b/numpy/polynomial/polynomial.py @@ -787,7 +787,7 @@ def polyvalfromroots(x, r, tensor=True): If `r` is of length `N`, this function returns the value - .. math:: p(x) = \prod_{n=1}^{N} (x - r_n) + .. math:: p(x) = \\prod_{n=1}^{N} (x - r_n) The parameter `x` is converted to an array only if it is a tuple or a list, otherwise it is treated as a scalar. In either case, either `x` |