diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-27 13:26:58 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-03-01 11:22:47 -0700 |
commit | 6aa264c4bad9c89ccdd9ecd5a1cb5ef10643ec51 (patch) | |
tree | 15cad18dacf1ef03380c957ed9af4f39b94c5012 /numpy/random | |
parent | 3c13c0a925276130d66be490eed4ae337712cce2 (diff) | |
download | numpy-6aa264c4bad9c89ccdd9ecd5a1cb5ef10643ec51.tar.gz |
2to3: Put `from __future__ import division in every python file.
This should be harmless, as we already are division clean. However,
placement of this import takes some care. In the future a script
can be used to append new features without worry, at least until
such time as it exceeds a single line. Having that ability will
make it easier to deal with absolute imports and printing updates.
Diffstat (limited to 'numpy/random')
-rw-r--r-- | numpy/random/__init__.py | 2 | ||||
-rw-r--r-- | numpy/random/info.py | 1 | ||||
-rw-r--r-- | numpy/random/mtrand/generate_mtrand_c.py | 2 | ||||
-rw-r--r-- | numpy/random/setup.py | 2 | ||||
-rw-r--r-- | numpy/random/tests/test_random.py | 2 | ||||
-rw-r--r-- | numpy/random/tests/test_regression.py | 2 |
6 files changed, 11 insertions, 0 deletions
diff --git a/numpy/random/__init__.py b/numpy/random/__init__.py index 34e57ba2c..f005bc15a 100644 --- a/numpy/random/__init__.py +++ b/numpy/random/__init__.py @@ -86,6 +86,8 @@ set_state Set state of generator. ==================== ========================================================= """ +from __future__ import division + # To get sub-modules from info import __doc__, __all__ diff --git a/numpy/random/info.py b/numpy/random/info.py index 6139e5784..c886c565e 100644 --- a/numpy/random/info.py +++ b/numpy/random/info.py @@ -82,6 +82,7 @@ set_state Set state of generator. ==================== ========================================================= """ +from __future__ import division depends = ['core'] diff --git a/numpy/random/mtrand/generate_mtrand_c.py b/numpy/random/mtrand/generate_mtrand_c.py index a37fc7266..d6527e695 100644 --- a/numpy/random/mtrand/generate_mtrand_c.py +++ b/numpy/random/mtrand/generate_mtrand_c.py @@ -1,4 +1,6 @@ #!/usr/bin/env python +from __future__ import division + import sys import re import os diff --git a/numpy/random/setup.py b/numpy/random/setup.py index dde3119b7..c4582d007 100644 --- a/numpy/random/setup.py +++ b/numpy/random/setup.py @@ -1,3 +1,5 @@ +from __future__ import division + from os.path import join, split, dirname import os import sys diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py index e8875e578..251cee30c 100644 --- a/numpy/random/tests/test_random.py +++ b/numpy/random/tests/test_random.py @@ -1,3 +1,5 @@ +from __future__ import division + from numpy.testing import TestCase, run_module_suite, assert_,\ assert_raises from numpy import random diff --git a/numpy/random/tests/test_regression.py b/numpy/random/tests/test_regression.py index 55852cc98..a19974c47 100644 --- a/numpy/random/tests/test_regression.py +++ b/numpy/random/tests/test_regression.py @@ -1,3 +1,5 @@ +from __future__ import division + from numpy.testing import TestCase, run_module_suite, assert_,\ assert_array_equal from numpy import random |