Skip to content

Commit bb726ca

Browse files
committed
2to3: Apply print fixer.
Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes numpy#3078.
1 parent 7441fa5 commit bb726ca

File tree

422 files changed

+888
-894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

422 files changed

+888
-894
lines changed

doc/cdoc/numpyfilter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Also, add Doxygen /** and /**< syntax automatically where appropriate.
77
88
"""
9-
from __future__ import division, absolute_import
9+
from __future__ import division, absolute_import, print_function
1010

1111
import sys
1212
import re

doc/cython/run_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
from __future__ import division, absolute_import
2+
from __future__ import division, absolute_import, print_function
33

44
from numpyx import test
55
test()

doc/cython/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
http://cython.org.
66
77
"""
8-
from __future__ import division
8+
from __future__ import division, print_function
99

1010
from distutils.core import setup
1111
from distutils.extension import Extension

doc/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
a line by itself, preferably preceeded by a blank line.
99
1010
"""
11-
from __future__ import division, absolute_import
11+
from __future__ import division, absolute_import, print_function
1212

1313
import os # standard library imports first
1414

doc/newdtype_example/example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import division, absolute_import
1+
from __future__ import division, absolute_import, print_function
22

33
import floatint.floatint as ff
44
import numpy as np
@@ -12,7 +12,7 @@
1212

1313
# Now, the elements will be the scalar type associated
1414
# with the ndarray.
15-
print g[0]
16-
print type(g[1])
15+
print(g[0])
16+
print(type(g[1]))
1717

1818
# Now, you need to register ufuncs and more arrfuncs to do useful things...
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from __future__ import division, absolute_import
1+
from __future__ import division, absolute_import, print_function
22

33

doc/newdtype_example/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import division
1+
from __future__ import division, print_function
22

33
from numpy.distutils.core import setup
44

doc/numpybook/comparison/ctypes/filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import division, absolute_import
1+
from __future__ import division, absolute_import, print_function
22

33
__all__ = ['filter2d']
44

doc/numpybook/comparison/ctypes/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import division, absolute_import
1+
from __future__ import division, absolute_import, print_function
22

33
__all__ = ['add', 'filter2d']
44

doc/numpybook/comparison/pyrex/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
from __future__ import division
2+
from __future__ import division, print_function
33

44
from distutils.core import setup
55
from distutils.extension import Extension

0 commit comments

Comments
 (0)