summaryrefslogtreecommitdiff
path: root/numpy/random/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/random/tests')
-rw-r--r--numpy/random/tests/test_random.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 8dae16fcb..9d3de27e2 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -15,6 +15,17 @@ class TestMultinomial(TestCase):
assert np.all(-5 <= x)
assert np.all(x < -1)
+class TestVonMises(TestCase):
+ def test_output_domain(self):
+ """Make sure generated random variables are in [-pi, pi].
+
+ Regression test for ticket #986.
+ """
+ for mu in np.linspace(-7., 7., 5):
+ r = random.mtrand.vonmises(mu,1,50)
+ assert np.all(r>-np.pi) and np.all(r<=np.pi)
+
+
class TestSetState(TestCase):
def setUp(self):