summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-07-27 09:42:52 -0600
committerCharles Harris <charlesr.harris@gmail.com>2021-07-27 09:42:52 -0600
commit81e4fe4dc7f37a2f80a50b3e363fd25286cfb353 (patch)
tree00235b38e9d20de42503f7b400f74e23e28ff097 /numpy
parent2f782a2f1afa1b25ffacb3ca1ffdbbab0abc1504 (diff)
downloadnumpy-81e4fe4dc7f37a2f80a50b3e363fd25286cfb353.tar.gz
BUG: Seed random state in test_vonmises_large_kappa_range.
This makes the test reproducible. See comments on failing test in #19540.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/random/tests/test_generator_mt19937.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/random/tests/test_generator_mt19937.py b/numpy/random/tests/test_generator_mt19937.py
index 4abcf6fe4..7ddccaf86 100644
--- a/numpy/random/tests/test_generator_mt19937.py
+++ b/numpy/random/tests/test_generator_mt19937.py
@@ -1760,6 +1760,7 @@ class TestRandomDist:
@pytest.mark.parametrize("mu", [-7., -np.pi, -3.1, np.pi, 3.2])
@pytest.mark.parametrize("kappa", [1e-9, 1e-6, 1, 1e3, 1e15])
def test_vonmises_large_kappa_range(self, mu, kappa):
+ random = Generator(MT19937(self.seed))
r = random.vonmises(mu, kappa, 50)
assert_(np.all(r > -np.pi) and np.all(r <= np.pi))