diff options
| author | Stefan van der Walt <stefan@sun.ac.za> | 2007-08-28 22:26:59 +0000 |
|---|---|---|
| committer | Stefan van der Walt <stefan@sun.ac.za> | 2007-08-28 22:26:59 +0000 |
| commit | 4eb3857581478c4e634743afeb9b58fd46fb9edb (patch) | |
| tree | 69b226eb3b4ea8ae09f264b948f4a212d110805e /numpy/random/tests/test_random.py | |
| parent | 97c4dd0f2e53398eeb41c326cc147518f0d2d288 (diff) | |
| download | numpy-4eb3857581478c4e634743afeb9b58fd46fb9edb.tar.gz | |
Temporary workaround for problem with 'multivariate' when specifying zero
probabilities.
Diffstat (limited to 'numpy/random/tests/test_random.py')
| -rw-r--r-- | numpy/random/tests/test_random.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py new file mode 100644 index 000000000..8f7842085 --- /dev/null +++ b/numpy/random/tests/test_random.py @@ -0,0 +1,13 @@ +from numpy.testing import * +from numpy import random +import numpy as N + +class test_multinomial(NumpyTestCase): + def test_basic(self): + random.multinomial(100, [0.2, 0.8]) + + def test_zero_probability(self): + random.multinomial(100, [0.2, 0.8, 0.0, 0.0, 0.0]) + +if __name__ == "__main__": + NumpyTest().run() |
