diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-03-01 13:57:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-01 13:57:51 +0000 |
commit | 05d99c83e5774b943797f00b8618bbd6f3ce11d4 (patch) | |
tree | 8ddaaf4660e1ea727499a45fad21f8f42d163a67 | |
parent | 35d752cbd34754667b55678f552dbdcfc5274d27 (diff) | |
parent | 26768ae7066bb4417dd05de7747039edf3c116e1 (diff) | |
download | numpy-05d99c83e5774b943797f00b8618bbd6f3ce11d4.tar.gz |
Merge pull request #8718 from MareinK/random_choice_test_asserts
BUG: Fix assert statements in random.choice tests
-rw-r--r-- | numpy/random/tests/test_random.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py index dc7d18933..e4c58e2bd 100644 --- a/numpy/random/tests/test_random.py +++ b/numpy/random/tests/test_random.py @@ -384,11 +384,11 @@ class TestRandomDist(TestCase): # Check multi dimensional array s = (2, 3) p = [0.1, 0.1, 0.1, 0.1, 0.4, 0.2] - assert_(np.random.choice(6, s, replace=True).shape, s) - assert_(np.random.choice(6, s, replace=False).shape, s) - assert_(np.random.choice(6, s, replace=True, p=p).shape, s) - assert_(np.random.choice(6, s, replace=False, p=p).shape, s) - assert_(np.random.choice(np.arange(6), s, replace=True).shape, s) + assert_equal(np.random.choice(6, s, replace=True).shape, s) + assert_equal(np.random.choice(6, s, replace=False).shape, s) + assert_equal(np.random.choice(6, s, replace=True, p=p).shape, s) + assert_equal(np.random.choice(6, s, replace=False, p=p).shape, s) + assert_equal(np.random.choice(np.arange(6), s, replace=True).shape, s) def test_bytes(self): np.random.seed(self.seed) |