diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-02-24 13:58:48 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2017-02-24 13:58:48 -0700 |
commit | d7d3e212ce1ff176c718485aed889c77a48ef88f (patch) | |
tree | 711fcbcebe975e33c48170aefc9fbf36b79bdf35 /numpy | |
parent | 579718f1546df1e539cd2f7fbaf1617f06412eca (diff) | |
download | numpy-d7d3e212ce1ff176c718485aed889c77a48ef88f.tar.gz |
MAINT: Fix use of Python 2.6 deprecated escape sequences.
Closes #8687.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/code_generators/genapi.py | 2 | ||||
-rw-r--r-- | numpy/lib/function_base.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/code_generators/genapi.py b/numpy/core/code_generators/genapi.py index 05166f1e5..a71ffefdd 100644 --- a/numpy/core/code_generators/genapi.py +++ b/numpy/core/code_generators/genapi.py @@ -469,7 +469,7 @@ def fullapi_hash(api_dicts): # To parse strings like 'hex = checksum' where hex is e.g. 0x1234567F and # checksum a 128 bits md5 checksum (hex format as well) -VERRE = re.compile('(^0x[\da-f]{8})\s*=\s*([\da-f]{32})') +VERRE = re.compile(r'(^0x[\da-f]{8})\s*=\s*([\da-f]{32})') def get_versions_hash(): d = [] diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index fc49a6fd7..bee60fa20 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1644,7 +1644,7 @@ def gradient(f, *varargs, **kwargs): + \\left(h_{d}^{2} - h_{s}^{2}\\right)f\\left(x_{i}\\right) - h_{d}^{2}f\\left(x_{i}-h_{s}\\right)} { h_{s}h_{d}\\left(h_{d} + h_{s}\\right)} - + \mathcal{O}\\left(\\frac{h_{d}h_{s}^{2} + + \\mathcal{O}\\left(\\frac{h_{d}h_{s}^{2} + h_{s}h_{d}^{2}}{h_{d} + h_{s}}\\right) @@ -1656,7 +1656,7 @@ def gradient(f, *varargs, **kwargs): \\hat f_{i}^{(1)}= \\frac{f\\left(x_{i+1}\\right) - f\\left(x_{i-1}\\right)}{2h} - + \mathcal{O}\\left(h^{2}\\right) + + \\mathcal{O}\\left(h^{2}\\right) With a similar procedure the forward/backward approximations used for boundaries can be derived. |