Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f1c5451

Browse files
committed
Merge pull request numpy#6775 from charris/add-future-imports
MAINT: Include from __future__ boilerplate in some files missing it.
2 parents 9ce9b9a + 4743f3b commit f1c5451

File tree

11 files changed

+19
-2
lines changed

11 files changed

+19
-2
lines changed

numpy/_build_utils/apple_accelerate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import division, absolute_import, print_function
2+
13
import os
24
import sys
35
import re

numpy/compat/tests/test_compat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import division, absolute_import, print_function
2+
13
from os.path import join
24

35
from numpy.compat import isfileobj

numpy/core/tests/test_scalarinherit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
""" Test printing of scalar types.
33
44
"""
5+
from __future__ import division, absolute_import, print_function
56

67
import numpy as np
78
from numpy.testing import TestCase, run_module_suite

numpy/distutils/msvc9compiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import division, absolute_import, print_function
2+
13
import os
24
import distutils.msvc9compiler
35
from distutils.msvc9compiler import *

numpy/distutils/msvccompiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import division, absolute_import, print_function
2+
13
import os
24
import distutils.msvccompiler
35
from distutils.msvccompiler import *

numpy/f2py/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# See http://cens.ioc.ee/projects/f2py2e/
2+
from __future__ import division, print_function
3+
24
import os
35
import sys
46
for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:

numpy/lib/tests/test_packbits.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import numpy as np
1+
from __future__ import division, absolute_import, print_function
22

3+
import numpy as np
34
from numpy.testing import assert_array_equal, assert_equal, assert_raises
45

56

numpy/linalg/tests/test_deprecations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Test deprecation and future warnings.
22
33
"""
4+
from __future__ import division, absolute_import, print_function
5+
46
import numpy as np
57
from numpy.testing import assert_warns, run_module_suite
68

pavement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
- fix bdist_mpkg: we build the same source twice -> how to make sure we use
5555
the same underlying python for egg install in venv and for bdist_mpkg
5656
"""
57-
from __future__ import division, absolute_import, print_function
57+
from __future__ import division, print_function
5858

5959
# What need to be installed to build everything on mac os x:
6060
# - wine: python 2.6 and 2.5 + makensis + cpuid plugin + mingw, all in the PATH

runtests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
$ python runtests.py --lcov-html
2525
2626
"""
27+
from __future__ import division, print_function
2728

2829
#
2930
# This is a generic test runner script for projects using Numpy's test

0 commit comments

Comments
 (0)