diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-11 14:31:52 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-13 07:43:56 -0600 |
commit | 7f5af37e26ba2e99ad3ee6928b78437f601e96e0 (patch) | |
tree | 1b210bb7361ce691e781884bf06f89c7ebd13360 /numpy/random/tests/test_regression.py | |
parent | 74b08b3f0284d9d2dd55a15dd98a3846913b1b51 (diff) | |
download | numpy-7f5af37e26ba2e99ad3ee6928b78437f601e96e0.tar.gz |
2to3: Apply the `numliterals` fixer and skip the `long` fixer.
The numliterals fixer replaces the old style octal number like '01' by
'0o1' removes the 'L' suffix.
Octal values were previously mistakenly specified in some dates, those
uses have been corrected by removing the leading zeros.
Simply Removing the 'L' suffix should not be a problem, but in some
testing code it looks neccesary, so in those places the Python long
constructor is used instead.
The 'long' type is no longer defined in Python 3. Because we need to
have it defined for Python 2 it is added to numpy/compat/np3k.py where
it is defined as 'int' for Python 3 and 'long' for Python 2. The `long`
fixer then needs to be skipped so that it doesn't undo the good work.
Closes #3074, #3067.
Diffstat (limited to 'numpy/random/tests/test_regression.py')
-rw-r--r-- | numpy/random/tests/test_regression.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/random/tests/test_regression.py b/numpy/random/tests/test_regression.py index 1f223f60d..d2bbdbfb7 100644 --- a/numpy/random/tests/test_regression.py +++ b/numpy/random/tests/test_regression.py @@ -3,6 +3,7 @@ from __future__ import division, absolute_import, print_function from numpy.testing import TestCase, run_module_suite, assert_,\ assert_array_equal from numpy import random +from numpy.compat import long import numpy as np @@ -42,7 +43,7 @@ class TestRegression(TestCase): np.random.seed(1234) a = np.random.permutation(12) np.random.seed(1234) - b = np.random.permutation(12L) + b = np.random.permutation(long(12)) assert_array_equal(a, b) def test_hypergeometric_range(self) : |