diff options
author | Pauli Virtanen <pav@iki.fi> | 2010-07-09 08:11:39 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2010-07-09 08:11:39 +0000 |
commit | 237ed35fd848dc5a312e15206b4d729cd2e91f90 (patch) | |
tree | 7759d771b07dbc0c1563dc7c0e2a8cbca5c88060 /numpy/random/tests | |
parent | 8bb282307481e208f972a72c5745c63e2404cd66 (diff) | |
download | numpy-237ed35fd848dc5a312e15206b4d729cd2e91f90.tar.gz |
BUG: random: accept Python long as input to np.random.permutation (#1535)
Diffstat (limited to 'numpy/random/tests')
-rw-r--r-- | numpy/random/tests/test_random.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py index 3c0e5d422..8b5d083a3 100644 --- a/numpy/random/tests/test_random.py +++ b/numpy/random/tests/test_random.py @@ -34,6 +34,12 @@ class TestRegression(TestCase): msg = "Frequency was %f, should be < 0.23" % freq assert_(freq < 0.23, msg) + def test_permutation_longs(self): + np.random.seed(1234) + a = np.random.permutation(12) + np.random.seed(1234) + b = np.random.permutation(12L) + assert_array_equal(a, b) class TestMultinomial(TestCase): def test_basic(self): |