summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-03-01 13:57:51 +0000
committerGitHub <noreply@github.com>2017-03-01 13:57:51 +0000
commit05d99c83e5774b943797f00b8618bbd6f3ce11d4 (patch)
tree8ddaaf4660e1ea727499a45fad21f8f42d163a67 /numpy
parent35d752cbd34754667b55678f552dbdcfc5274d27 (diff)
parent26768ae7066bb4417dd05de7747039edf3c116e1 (diff)
downloadnumpy-05d99c83e5774b943797f00b8618bbd6f3ce11d4.tar.gz
Merge pull request #8718 from MareinK/random_choice_test_asserts
BUG: Fix assert statements in random.choice tests
Diffstat (limited to 'numpy')
-rw-r--r--numpy/random/tests/test_random.py10
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)