From 237ed35fd848dc5a312e15206b4d729cd2e91f90 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Fri, 9 Jul 2010 08:11:39 +0000 Subject: BUG: random: accept Python long as input to np.random.permutation (#1535) --- numpy/random/tests/test_random.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'numpy/random/tests') 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): -- cgit v1.2.1