summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/fix_default_axis.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/oldnumeric/fix_default_axis.py')
-rw-r--r--numpy/oldnumeric/fix_default_axis.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/oldnumeric/fix_default_axis.py b/numpy/oldnumeric/fix_default_axis.py
index 8483de85e..5f6128724 100644
--- a/numpy/oldnumeric/fix_default_axis.py
+++ b/numpy/oldnumeric/fix_default_axis.py
@@ -32,7 +32,10 @@ cumprod
prod
std
mean
+
"""
+from __future__ import division, absolute_import, print_function
+
__all__ = ['convertfile', 'convertall', 'converttree']
import sys
@@ -182,7 +185,7 @@ def _import_change(fstr, names):
ind = 0
importstr = "from numpy import"
N = len(importstr)
- while 1:
+ while True:
ind = fstr.find(importstr, ind)
if (ind < 0):
break
@@ -258,7 +261,7 @@ def convertfile(filename, import_change=False):
filestr = getfile(filename)
newstr, total = add_axis(filestr, import_change)
if total > 0:
- print "Changing ", filename
+ print("Changing ", filename)
copyfile(filename, filestr)
makenewfile(filename, newstr)
sys.stdout.flush()