diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-11-02 11:01:17 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-11-02 11:01:17 -0700 |
commit | f2f61b84b78909aa8c8aa6574b643de937d3348b (patch) | |
tree | a67b949004ec571a8fe11dd640d5fa9e7025104b /numpy/random/tests/test_random.py | |
parent | 80abf6ebf89c2ccececafc25238716ac13f0019e (diff) | |
parent | 04e40fc5c21335f296009f40f4599b66dc099e6d (diff) | |
download | numpy-f2f61b84b78909aa8c8aa6574b643de937d3348b.tar.gz |
Merge pull request #6613 from ev-br/noncentral_chisq
MAINT: random: allow nonc==0 in noncentral_chisquare.
Diffstat (limited to 'numpy/random/tests/test_random.py')
-rw-r--r-- | numpy/random/tests/test_random.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py index 596c218a2..ab7f90d82 100644 --- a/numpy/random/tests/test_random.py +++ b/numpy/random/tests/test_random.py @@ -504,6 +504,13 @@ class TestRandomDist(TestCase): [ 0.332334982684171 , 0.15451287602753125]]) np.testing.assert_array_almost_equal(actual, desired, decimal=14) + np.random.seed(self.seed) + actual = np.random.noncentral_chisquare(df=5, nonc=0, size=(3, 2)) + desired = np.array([[9.597154162763948, 11.725484450296079], + [10.413711048138335, 3.694475922923986], + [13.484222138963087, 14.377255424602957]]) + np.testing.assert_array_almost_equal(actual, desired, decimal=14) + def test_noncentral_f(self): np.random.seed(self.seed) actual = np.random.noncentral_f(dfnum=5, dfden=2, nonc=1, |