summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polytemplate.py
diff options
context:
space:
mode:
authornjsmith <njs@pobox.com>2013-04-02 08:53:45 -0700
committernjsmith <njs@pobox.com>2013-04-02 08:53:45 -0700
commita939f2aa83e7d37d5e35e7c2a8c539c59f682598 (patch)
treea5d3044d62baa8f52b2d7f42cfde58efd364eaf1 /numpy/polynomial/polytemplate.py
parent5b74363e020f90f09dd41916dfc749d56421b3fa (diff)
parent670b12649e34164514fc4981d8fbacfadf1f389e (diff)
downloadnumpy-a939f2aa83e7d37d5e35e7c2a8c539c59f682598.tar.gz
Merge pull request #3178 from charris/2to3-apply-import-fixer
2to3 apply import fixer
Diffstat (limited to 'numpy/polynomial/polytemplate.py')
-rw-r--r--numpy/polynomial/polytemplate.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/numpy/polynomial/polytemplate.py b/numpy/polynomial/polytemplate.py
index 7d67c914c..adf32170f 100644
--- a/numpy/polynomial/polytemplate.py
+++ b/numpy/polynomial/polytemplate.py
@@ -9,21 +9,16 @@ creating additional specific polynomial classes (e.g., Legendre, Jacobi,
etc.) in the future, such that all these classes will have a common API.
"""
-from __future__ import division
+from __future__ import division, absolute_import
import string
import sys
-if sys.version_info[0] >= 3:
- rel_import = "from . import"
-else:
- rel_import = "import"
-
polytemplate = string.Template('''
-from __future__ import division
+from __future__ import division, absolute_import
import numpy as np
import warnings
-REL_IMPORT polyutils as pu
+from . import polyutils as pu
class $name(pu.PolyBase) :
"""A $name series class.
@@ -918,4 +913,4 @@ class $name(pu.PolyBase) :
"""
return series.convert(domain, $name, window)
-'''.replace('REL_IMPORT', rel_import))
+''')